[Bf-blender-cvs] [8d1b289] master: Code cleanup: warnings (clang)

Campbell Barton noreply at git.blender.org
Sun Mar 30 10:38:30 CEST 2014


Commit: 8d1b289b78be3fc781aacfc55688a83425f1720e
Author: Campbell Barton
Date:   Sun Mar 30 19:37:43 2014 +1100
https://developer.blender.org/rB8d1b289b78be3fc781aacfc55688a83425f1720e

Code cleanup: warnings (clang)

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

M	source/blender/blenlib/BLI_strict_flags.h
M	source/blender/editors/sculpt_paint/paint_image_proj.c

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

diff --git a/source/blender/blenlib/BLI_strict_flags.h b/source/blender/blenlib/BLI_strict_flags.h
index ce39078..908d02e 100644
--- a/source/blender/blenlib/BLI_strict_flags.h
+++ b/source/blender/blenlib/BLI_strict_flags.h
@@ -37,6 +37,9 @@
 #  if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408  /* gcc4.8+ only (behavior changed to ignore globals)*/
 #    pragma GCC diagnostic error "-Wshadow"
 #  endif
+#  ifdef __clang__  /* pedantic causes clang error */
+#    pragma GCC diagnostic ignored "-Wlanguage-extension-token"
+#  endif
 #endif
 
 #ifdef _MSC_VER
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index fc7165e..bbe99b9 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -3764,7 +3764,7 @@ static void do_projectpaint_draw(ProjPaintState *ps, ProjPixel *projPixel, const
 	}
 
 	rgb_float_to_uchar(rgba_ub, rgb);
-	rgba_ub[3] = FTOCHAR(mask);
+	rgba_ub[3] = f_to_char(mask);
 
 	if (ps->do_masking) {
 		IMB_blend_color_byte(projPixel->pixel.ch_pt, projPixel->origColor.ch, rgba_ub, ps->blend);




More information about the Bf-blender-cvs mailing list