1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
Author: Andreas Tille <tille@debian.org>
Last-Update: 2025-10-04
Bug-Debian: https://bugs.debian.org/1096642
Description: Make sure code builds with gcc-15
--- a/floatbg.c
+++ b/floatbg.c
@@ -44,7 +44,8 @@ Atom running_flag;
struct hsv { float h,s,v; };
struct rgb { float r,g,b; };
-void hsv2rgb(), ticks2hsv();
+void hsv2rgb (struct hsv *hsv, struct rgb *rgb);
+void ticks2hsv (int ticks, struct hsv *hsv);
float sf_in_hf = default_sf_in_hf;
float s_mid = default_s_mid;
float s_var = default_s_var;
@@ -52,13 +53,18 @@ float v_val = default_v_val;
float l_time = default_l_time;
unsigned long GetMutableColor();
-void SetColor();
+void SetColor (
+ unsigned long pixel,
+ struct rgb *rgb,
+ Display *dpy,
+ int screen,
+ Window root);
/* We no longer need these, since we now include stdlib.h and time.h. */
/* long time(), random(); */
/* double atof(); */
/* from xsetroot */
-unsigned long NameToPixel();
+unsigned long NameToPixel(char *name, unsigned long pixel);
int save_colors=0;
char str[100];
@@ -91,9 +97,7 @@ void clear_flag_exit(int signum) {
exit(0);
}
-int main(argc, argv)
- int argc;
- char **argv;
+int main(int argc, char **argv)
{
char *display_name = NULL;
unsigned long cmapentry;
@@ -254,12 +258,12 @@ unsigned long GetMutableColor ()
return(color.pixel);
}
-void SetColor (pixel, rgb, dpy, root, screen)
- unsigned long pixel;
- struct rgb *rgb;
- Display *dpy;
- int screen;
- Window root;
+void SetColor (
+ unsigned long pixel,
+ struct rgb *rgb,
+ Display *dpy,
+ int screen,
+ Window root)
{
XColor color;
unsigned int red = (int) MaxColor * rgb->r;
@@ -296,9 +300,7 @@ void SetColor (pixel, rgb, dpy, root, sc
}
}
-void ticks2hsv (ticks, hsv)
- int ticks;
- struct hsv *hsv;
+void ticks2hsv (int ticks, struct hsv *hsv)
{
float s_fase /*, sin() */ ;
@@ -308,9 +310,7 @@ void ticks2hsv (ticks, hsv)
hsv->v = v_val;
}
-void hsv2rgb (hsv, rgb)
- struct hsv *hsv;
- struct rgb *rgb;
+void hsv2rgb (struct hsv *hsv, struct rgb *rgb)
{
int i;
float f, p, q, r, h, v;
@@ -338,9 +338,7 @@ void hsv2rgb (hsv, rgb)
#define Dynamic 1
-unsigned long NameToPixel(name, pixel)
- char *name;
- unsigned long pixel;
+unsigned long NameToPixel(char *name, unsigned long pixel)
{
XColor ecolor;
|