[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58929] trunk/blender/source/blender: Fix build warnings with clang and UNUSED_RESULT_ATTR ( attribute declaration must precede definition).

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Aug 5 14:49:13 CEST 2013


Revision: 58929
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58929
Author:   blendix
Date:     2013-08-05 12:49:13 +0000 (Mon, 05 Aug 2013)
Log Message:
-----------
Fix build warnings with clang and UNUSED_RESULT_ATTR (attribute declaration must precede definition).

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_math_vector.h
    trunk/blender/source/blender/bmesh/intern/bmesh_core.c

Modified: trunk/blender/source/blender/blenlib/BLI_math_vector.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_vector.h	2013-08-05 12:44:42 UTC (rev 58928)
+++ trunk/blender/source/blender/blenlib/BLI_math_vector.h	2013-08-05 12:49:13 UTC (rev 58929)
@@ -36,10 +36,6 @@
 
 #include "BLI_math_inline.h"
 
-#if BLI_MATH_DO_INLINE
-#include "intern/math_vector_inline.c"
-#endif
-
 /************************************* Init ***********************************/
 
 #ifdef BLI_MATH_GCC_WARN_PRAGMA
@@ -286,6 +282,12 @@
 void fill_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val);
 void fill_vn_fl(float *array_tar, const int size, const float val);
 
+/**************************** Inline Definitions ******************************/
+
+#if BLI_MATH_DO_INLINE
+#include "intern/math_vector_inline.c"
+#endif
+
 #ifdef BLI_MATH_GCC_WARN_PRAGMA
 #  pragma GCC diagnostic pop
 #endif

Modified: trunk/blender/source/blender/bmesh/intern/bmesh_core.c
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_core.c	2013-08-05 12:44:42 UTC (rev 58928)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_core.c	2013-08-05 12:49:13 UTC (rev 58929)
@@ -1420,7 +1420,9 @@
 	e->l = NULL;
 	if (l_next) {
 		BMLoop *l_new, *l;
+#ifndef NDEBUG
 		int radlen = bmesh_radial_length(l_next);
+#endif
 		int first1 = 0, first2 = 0;
 
 		/* Take the next loop. Remove it from radial. Split it. Append to appropriate radials */




More information about the Bf-blender-cvs mailing list