Source: libsx
Severity: minor
Tags: patch
User: pkg-llvm-t...@lists.alioth.debian.org
Usertags: clang-ftbfs

Hello,

Using the rebuild infrastructure, your package fails to build with clang 
(instead of gcc).

We detected this kinf of error:
http://clang.debian.net/status.php?version=3.5.0rc1&key=NOT_ALLOWED_HERE

Full build log is available here:
http://clang.debian.net/logs/2014-06-16/libsx_2.05-5_unstable_clang.log

Thanks,
Alexander

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- ./src/popups.c	2009-09-11 16:49:37.000000000 +0400
+++ ../libsx-2.05-my/./src/popups.c	2014-08-19 00:11:47.317545890 +0400
@@ -61,20 +61,17 @@
   return string;
 }
 
-char *GetText(char *blurb, char *default_string, int width, int height)
-{
-Widget wid_gettext[6];
-char *string;
-int i;
+static char *string;
+static Widget wid_gettext[6];
 
-  void GetTextCancel(Widget ww, void* data)
+static void GetTextCancel(Widget ww, void* data)
   {
      string = NULL;
      SetCurrentWindow(ww);
      CloseWindow();
   }
 
-  void GetTextOkay(Widget ww, void* data)
+static void GetTextOkay(Widget ww, void* data)
   {
   char *ptr;
 
@@ -88,6 +85,10 @@
      CloseWindow();
   }
 
+char *GetText(char *blurb, char *default_string, int width, int height)
+{
+int i;
+
    MakeWindow("GetText",SAME_DISPLAY, EXCLUSIVE_WINDOW);
    
    string = NULL;
--- ./src/grabpix.c	2014-08-19 00:17:57.000000000 +0400
+++ ../libsx-2.05-my/./src/grabpix.c	2014-08-19 00:16:18.364751617 +0400
@@ -110,8 +110,7 @@
     w->core.window = RootWindowOfScreen(w->core.screen);
 }
 
-char *GrabPixel(char *format)
-{
+
 static Cursor newcursor;
 static Display *dpy;
 static int scr;
@@ -119,6 +118,16 @@
 static XGCValues selectGCV;
 static Widget toplevel, root;
 
+static char lens_bits[] = {
+   0x00, 0x00, 0xf8, 0x00, 0x24, 0x01, 0x22, 0x02, 0x02, 0x02, 0x8e, 0x03,
+   0x02, 0x02, 0x22, 0x02, 0x24, 0x07, 0xf8, 0x0d, 0x00, 0x13, 0x00, 0x22,
+   0x00, 0x44, 0x00, 0x28, 0x00, 0x10, 0x00, 0x00};
+
+static char lensMask_bits[] = {
+   0xf8, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0x77, 0x07, 0x8f, 0x07, 0x8f, 0x07,
+   0x8f, 0x07, 0x77, 0x07, 0xfe, 0x0f, 0xfc, 0x1f, 0xf8, 0x3f, 0x00, 0x7f,
+   0x00, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x10};
+
 static int sec = 2;  /* security border strip */
 static unsigned int srcWidth=1, srcHeight=1;
 /* static char formatstr[256]="Pixel at (%x,%y) colored [%r,%g,%b]\n\
@@ -135,18 +144,7 @@
 #define lensMask_x_hot 5
 #define lensMask_y_hot 5
 
-static char lens_bits[] = {
-   0x00, 0x00, 0xf8, 0x00, 0x24, 0x01, 0x22, 0x02, 0x02, 0x02, 0x8e, 0x03,
-   0x02, 0x02, 0x22, 0x02, 0x24, 0x07, 0xf8, 0x0d, 0x00, 0x13, 0x00, 0x22,
-   0x00, 0x44, 0x00, 0x28, 0x00, 0x10, 0x00, 0x00};
-
-static char lensMask_bits[] = {
-   0xf8, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0x77, 0x07, 0x8f, 0x07, 0x8f, 0x07,
-   0x8f, 0x07, 0x77, 0x07, 0xfe, 0x0f, 0xfc, 0x1f, 0xf8, 0x3f, 0x00, 0x7f,
-   0x00, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x10};
-
-void
-InitCursors()
+static void InitCursors()
 {
 Pixmap cursor,mask;
 XColor cfor,cbak;
@@ -162,8 +160,7 @@
                    lens_x_hot,lens_y_hot);
 }
 
-void 
-SetupGC()
+static void SetupGC()
 {
     selectGCV.function = GXxor;
     selectGCV.foreground = 1L;
@@ -172,9 +169,7 @@
 		       &selectGCV);
 }  
 
-Window 
-FindWindow(x, y)
-     int x, y;	  
+static Window FindWindow(int x, int y)
 {
   XWindowAttributes wa;
   Window findW = DefaultRootWindow(dpy), stopW, childW;
@@ -194,15 +189,13 @@
   return findW;
 }
 
-void
-CreateRoot()
+static void CreateRoot()
 {
   root = XtCreateWidget("root", rootWindowWidgetClass, toplevel, NULL, 0);
   XtRealizeWidget(root);
 }
 
-void
-StartRootPtrGrab()   
+static void StartRootPtrGrab(char *format)
 {
   Window    rootR, childR, window;
   int       rootX, rootY, winX, winY;
@@ -282,6 +275,8 @@
   goto restart;
 }
 
+char *GrabPixel(char *format)
+{
   dpy = lsx_curwin->display;
   scr = DefaultScreen(dpy);
   toplevel = lsx_curwin->toplevel;
@@ -289,7 +284,7 @@
   InitCursors();
   SetupGC();
   CreateRoot();
-  StartRootPtrGrab();
+  StartRootPtrGrab(format);
   return(output);
 }
 
--- ./src/colorsel.c	2014-08-19 00:17:57.000000000 +0400
+++ ../libsx-2.05-my/./src/colorsel.c	2014-08-19 00:17:02.991962251 +0400
@@ -65,7 +65,7 @@
 static void show_best_match(Widget w, CSelData *cdata);
 */
 
-int trunc(float v)
+static int trunc_(float v)
 {
   return (int)(0.5+v);
 }
@@ -203,25 +203,25 @@
         reset = True;
 	}
 
-      if (reset || trunc(cdata->r) != w_r)
+      if (reset || trunc_(cdata->r) != w_r)
 	{
-        w_r = trunc(cdata->r);
+        w_r = trunc_(cdata->r);
         sprintf(cvalue, "%d", w_r);
         SetScrollbar(cdata->red_scroll, (float)cdata->r, 255.0, 1.0);
         SetStringEntry(cdata->red_string, cvalue);
 	}
 
-      if (reset || trunc(cdata->g) != w_g)
+      if (reset || trunc_(cdata->g) != w_g)
 	{
-        w_g = trunc(cdata->g);
+        w_g = trunc_(cdata->g);
         sprintf(cvalue, "%d", w_g);
         SetScrollbar(cdata->green_scroll, (float)cdata->g, 255.0, 1.0);
         SetStringEntry(cdata->green_string, cvalue);
 	}
       
-      if (reset || trunc(cdata->b) != w_b)
+      if (reset || trunc_(cdata->b) != w_b)
 	{
-        w_b = trunc(cdata->b);
+        w_b = trunc_(cdata->b);
         sprintf(cvalue, "%d", w_b);
         SetScrollbar(cdata->blue_scroll, (float)cdata->b, 255.0, 1.0);
         SetStringEntry(cdata->blue_string, cvalue);
@@ -252,25 +252,25 @@
         reset = True;
 	}
 
-      if (reset || trunc(cdata->h) != w_h)
+      if (reset || trunc_(cdata->h) != w_h)
 	{
-        w_h = trunc(cdata->h);
+        w_h = trunc_(cdata->h);
         sprintf(cvalue, "%d", w_h);
         SetScrollbar(cdata->red_scroll, (float)cdata->h, 360.0, 1.0);
         SetStringEntry(cdata->red_string, cvalue);
 	}
       
-      if (reset || trunc(cdata->s) != w_s)
+      if (reset || trunc_(cdata->s) != w_s)
 	{
-        w_s = trunc(cdata->s);
+        w_s = trunc_(cdata->s);
         sprintf(cvalue, "%d", w_s);
         SetScrollbar(cdata->green_scroll, (float)cdata->s, 100.0, 1.0);
         SetStringEntry(cdata->green_string, cvalue);
 	}
       
-      if (reset || trunc(cdata->v) != w_v)
+      if (reset || trunc_(cdata->v) != w_v)
 	{
-        w_v = trunc(cdata->v);
+        w_v = trunc_(cdata->v);
         sprintf(cvalue, "%d", w_v);
         SetScrollbar(cdata->blue_scroll, (float)cdata->v, 255.0, 1.0);
         SetStringEntry(cdata->blue_string, cvalue);
@@ -302,33 +302,33 @@
         reset = True;
 	}
 
-      if (reset || trunc(cdata->c) != w_c)
+      if (reset || trunc_(cdata->c) != w_c)
 	{
-        w_c = trunc(cdata->c);
+        w_c = trunc_(cdata->c);
         sprintf(cvalue, "%d", w_c);
         SetScrollbar(cdata->red_scroll, (float)cdata->c, 100.0, 1.0);
         SetStringEntry(cdata->red_string, cvalue);
 	}
       
-      if (reset || trunc(cdata->m) != w_m)
+      if (reset || trunc_(cdata->m) != w_m)
 	{
-        w_m = trunc(cdata->m);
+        w_m = trunc_(cdata->m);
         sprintf(cvalue, "%d", w_m);
         SetScrollbar(cdata->green_scroll, (float)cdata->m, 100.0, 1.0);
         SetStringEntry(cdata->green_string, cvalue);
 	}
       
-      if (reset || trunc(cdata->y) != w_y)
+      if (reset || trunc_(cdata->y) != w_y)
 	{
-        w_y = trunc(cdata->y);
+        w_y = trunc_(cdata->y);
         sprintf(cvalue, "%d", w_y);
         SetScrollbar(cdata->blue_scroll, (float)cdata->y, 100.0, 1.0);
         SetStringEntry(cdata->blue_string, cvalue);
 	}
 
-      if (reset || trunc(cdata->k) != w_k)
+      if (reset || trunc_(cdata->k) != w_k)
 	{
-        w_k = trunc(cdata->k);
+        w_k = trunc_(cdata->k);
         sprintf(cvalue, "%d", w_k);
         SetScrollbar(cdata->black_scroll, (float)cdata->k, 100.0, 1.0);
         SetStringEntry(cdata->black_string, cvalue);
@@ -409,7 +409,7 @@
     }
 
   sprintf(cdata->match_list[0], "  %3d %3d %3d      %s",
-          trunc(fr), trunc(fg), trunc(fb), 
+          trunc_(fr), trunc_(fg), trunc_(fb),
           SX_Dialog[COLSEL_DIAL]);
     cdata->match_ptr[0] = cdata->match_list[0];
 
@@ -448,7 +448,7 @@
     {
     numerical:
     sprintf(cdata->save, "#%02X%02X%02X",      
-          trunc(cdata->r), trunc(cdata->g), trunc(cdata->b));
+          trunc_(cdata->r), trunc_(cdata->g), trunc_(cdata->b));
     }
   else
     {
@@ -456,9 +456,9 @@
     sscanf(cdata->match_ptr[0], "%d %d %d %s", &r, &g, &b, cdata->save);
     if (cdata->output==1)
       {
-      if (r!=trunc(cdata->r)
-             || g!=trunc(cdata->g)
-             || b!=trunc(cdata->b)) goto numerical;
+      if (r!=trunc_(cdata->r)
+             || g!=trunc_(cdata->g)
+             || b!=trunc_(cdata->b)) goto numerical;
       }
     }
   if (mydepth<16)

Reply via email to