gcc 4.8 in openSUSE 13.1 warns about this code: states/state_brush.cpp:824:44: warning: operation on 'hue' may be undefined [-Wsequence-point] : hue = 60.0 * (((r - g)/(diff))+4.0);
Remove early assignment and adjust indention to clearify logical code flow. Signed-off-by: Olaf Hering <o...@aepfle.de> --- src/gui/states/state_brush.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Index: synfigstudio-1.0/src/gui/states/state_brush.cpp =================================================================== --- synfigstudio-1.0.orig/src/gui/states/state_brush.cpp +++ synfigstudio-1.0/src/gui/states/state_brush.cpp @@ -818,10 +818,10 @@ StateBrush_Context::event_mouse_down_han Real val = max_rgb; Real sat = max_rgb != 0 ? 1.0 - (min_rgb / max_rgb) : 0; - Real hue = max_rgb == min_rgb ? 0 - : max_rgb == r ? 60.0 * fmod ((g - b)/(diff), 6.0) - : max_rgb == g ? hue = 60.0 * (((b - r)/(diff))+2.0) - : hue = 60.0 * (((r - g)/(diff))+4.0); + Real hue = max_rgb == min_rgb ? + 0 : max_rgb == r ? + 60.0 * fmod ((g - b)/(diff), 6.0) : max_rgb == g ? + 60.0 * (((b - r)/(diff))+2.0) : 60.0 * (((r - g)/(diff))+4.0); Real opaque = color.get_a(); Real radius = synfigapp::Main::get_bline_width(); ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl