2015-06-22 23:37 GMT+06:00 Olaf Hering <o...@aepfle.de>:
>
> 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();
>

Merged into master branch. Thank you!

Best Regards,
Konstantin

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to