Quiet gcc warnings about potentially uninitialized variables 50/9450/1
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Sat, 20 Jul 2013 06:45:05 +0000 (23:45 -0700)
committerSung-Jin Park <sj76.park@samsung.com>
Tue, 3 Sep 2013 04:11:42 +0000 (00:11 -0400)
It should have been impossible for these to be used without being
initialized, but following the logic to prove that was trickier
than the compiler was willing to unravel.

Change-Id: Ib51714d5b5d048923388fcd55eff3fb062526d0e
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
multiVis.c

index e2b0bc2..4ee06d5 100644 (file)
@@ -299,7 +299,7 @@ static void TransferImage(Display *disp, XImage *reg_image,
 {
     int i,j,old_pixel,new_pixel,red_ind,green_ind,blue_ind ;
     XColor *colors;
-    int rShift,gShift,bShift;
+    int rShift = 0, gShift = 0, bShift = 0;
 
     (void) QueryColorMap(disp,reg->cmap,reg->vis,&colors,
         &rShift,&gShift,&bShift) ;