<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39486 >

 $subject for --enable-debug compilation.


 - ML

diff -Nurd -X.diff_ignore freeciv/utility/ftwl/widget_slider.c freeciv/utility/ftwl/widget_slider.c
--- freeciv/utility/ftwl/widget_slider.c	2007-08-04 18:36:12.000000000 +0300
+++ freeciv/utility/ftwl/widget_slider.c	2007-08-04 20:48:14.000000000 +0300
@@ -274,8 +274,12 @@
     repeat_size2 = repeat_size;
     repeat_size2.height /= 4;
 
+    /* This is outside 'if (center)' -block to avoid
+     * '...might be used uninitialized...' warning from
+     * compiler that does not realize that it's never
+     * used if center == NULL. */
+    center_size2 = center_size;
     if (center) {
-      center_size2 = center_size;
       center_size2.height /= 4;
     }
 
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to