<URL: http://bugs.freeciv.org/Ticket/Display.html?id=34129 >
> [EMAIL PROTECTED] - Sa 20. Jan 2007, 00:49:16]: > > cc1: warnings being treated as errors > ../../../src.patched/client/gui-sdl/widget_scrollbar.c: In function > 'scroll_mouse_motion_handler': > ../../../src.patched/client/gui-sdl/widget_scrollbar.c:960: warning: > implicit declaration of function 'round' > ../../../src.patched/client/gui-sdl/widget_scrollbar.c:960: warning: > incompatible implicit declaration of built-in function 'round' > > > - ML > Patch attached.
Index: client/gui-sdl/widget_scrollbar.c =================================================================== --- client/gui-sdl/widget_scrollbar.c (Revision 12506) +++ client/gui-sdl/widget_scrollbar.c (Arbeitskopie) @@ -15,6 +15,7 @@ #include <config.h> #endif +#include <math.h> #include <SDL/SDL.h> /* utility */ @@ -956,7 +957,7 @@ normalized_y = (y - pMotion->offset); net_slider_area = (pMotion->pVscroll->max - pMotion->pVscroll->min - pMotion->pVscroll->pScrollBar->size.h); - net_count = round((float)pMotion->pVscroll->count / pMotion->pVscroll->step) - pMotion->pVscroll->active + 1; + net_count = round((double)pMotion->pVscroll->count / pMotion->pVscroll->step) - pMotion->pVscroll->active + 1; scroll_step = (float)net_slider_area / net_count; if ((yrel != 0) &&
_______________________________________________ Freeciv-dev mailing list [email protected] https://mail.gna.org/listinfo/freeciv-dev
