[Bf-blender-cvs] [69065b5] master: Compiler warnings: quiet warnings for gcc4.7x patch from Sergey

Campbell Barton noreply at git.blender.org
Sat Dec 7 04:29:45 CET 2013


Commit: 69065b5b2c4119911dc49f9ee773fded57dcff51
Author: Campbell Barton
Date:   Sat Dec 7 13:21:59 2013 +1100
http://developer.blender.org/rB69065b5b2c4119911dc49f9ee773fded57dcff51

Compiler warnings: quiet warnings for gcc4.7x
patch from Sergey

===================================================================

M	source/blender/blenlib/BLI_utildefines.h
M	source/blender/blenlib/intern/math_color.c

===================================================================

diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index db607d6..053edcc 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -182,7 +182,7 @@
 
 #define ABS(a)          ( (a) < 0 ? (-(a)) : (a) )
 
-#define FTOCHAR(val) ((val) <= 0.0f) ? 0 : (((val) > (1.0f - 0.5f / 255.0f)) ? 255 : (char)((255.0f * (val)) + 0.5f))
+#define FTOCHAR(val) (char)(((val) <= 0.0f) ? 0 : (((val) > (1.0f - 0.5f / 255.0f)) ? 255 : ((255.0f * (val)) + 0.5f)))
 #define FTOUSHORT(val) ((val >= 1.0f - 0.5f / 65535) ? 65535 : (val <= 0.0f) ? 0 : (unsigned short)(val * 65535.0f + 0.5f))
 #define USHORTTOUCHAR(val) ((unsigned char)(((val) >= 65535 - 128) ? 255 : ((val) + 128) >> 8))
 #define F3TOCHAR3(v2, v1) {                                                   \
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index 4c1620f..f57ae96 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -35,9 +35,7 @@
 #include "BLI_rand.h"
 #include "BLI_utildefines.h"
 
-#ifndef __MINGW32__
 #include "BLI_strict_flags.h"
-#endif
 
 void hsv_to_rgb(float h, float s, float v, float *r, float *g, float *b)
 {




More information about the Bf-blender-cvs mailing list