[Bf-blender-cvs] [2ea78fb] master: Fix for clang build warnings: ATTR_WARN_UNUSED_RESULT is used after the inline definitions are included, which gives lots of warnings "attribute declaration must precede definition".

Lukas Tönne noreply at git.blender.org
Thu Mar 20 13:22:25 CET 2014


Commit: 2ea78fb28f5f90c736b6d048b5e1f1d787c48920
Author: Lukas Tönne
Date:   Thu Mar 20 10:08:19 2014 +0100
https://developer.blender.org/rB2ea78fb28f5f90c736b6d048b5e1f1d787c48920

Fix for clang build warnings: ATTR_WARN_UNUSED_RESULT is used after
the inline definitions are included, which gives lots of warnings
"attribute declaration must precede definition".

See also rB83617429cf28f2a19e991a0f71d892fc159a4419

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

M	source/blender/blenlib/BLI_math_geom.h

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

diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index 8b5190b..633887e 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -37,10 +37,6 @@ extern "C" {
 #include "BLI_compiler_attrs.h"
 #include "BLI_math_inline.h"
 
-#if BLI_MATH_DO_INLINE
-#include "intern/math_geom_inline.c"
-#endif
-
 #ifdef BLI_MATH_GCC_WARN_PRAGMA
 #  pragma GCC diagnostic push
 #  pragma GCC diagnostic ignored "-Wredundant-decls"
@@ -314,6 +310,12 @@ MINLINE int min_axis_v3(const float vec[3]);
 
 MINLINE int poly_to_tri_count(const int poly_count, const int corner_count);
 
+/**************************** Inline Definitions ******************************/
+
+#if BLI_MATH_DO_INLINE
+#include "intern/math_geom_inline.c"
+#endif
+
 #ifdef BLI_MATH_GCC_WARN_PRAGMA
 #  pragma GCC diagnostic pop
 #endif




More information about the Bf-blender-cvs mailing list