[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51030] trunk/blender/source/blender/ makesdna: use GCC's -Wpadded on DNA files, gives more useful warnings then makesdna.

Campbell Barton ideasman42 at gmail.com
Thu Oct 4 11:20:59 CEST 2012


Revision: 51030
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51030
Author:   campbellbarton
Date:     2012-10-04 09:20:58 +0000 (Thu, 04 Oct 2012)
Log Message:
-----------
use GCC's -Wpadded on DNA files, gives more useful warnings then makesdna.

Modified Paths:
--------------
    trunk/blender/source/blender/makesdna/DNA_curve_types.h
    trunk/blender/source/blender/makesdna/intern/makesdna.c

Modified: trunk/blender/source/blender/makesdna/DNA_curve_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_curve_types.h	2012-10-04 09:12:08 UTC (rev 51029)
+++ trunk/blender/source/blender/makesdna/DNA_curve_types.h	2012-10-04 09:20:58 UTC (rev 51030)
@@ -74,7 +74,7 @@
 typedef struct BevList {
 	struct BevList *next, *prev;
 	int nr, dupe_nr;
-	short poly, hole;
+	int poly, hole;
 } BevList;
 
 /* These two Lines with # tell makesdna this struct can be excluded. */

Modified: trunk/blender/source/blender/makesdna/intern/makesdna.c
===================================================================
--- trunk/blender/source/blender/makesdna/intern/makesdna.c	2012-10-04 09:12:08 UTC (rev 51029)
+++ trunk/blender/source/blender/makesdna/intern/makesdna.c	2012-10-04 09:20:58 UTC (rev 51030)
@@ -1187,6 +1187,13 @@
 }
 
 /* include files for automatic dependencies */
+
+/* extra safety check that we are aligned,
+ * warnings here are easier to fix the makesdna's */
+#ifdef __GNUC__
+#  pragma GCC diagnostic error "-Wpadded"
+#endif
+
 #include "DNA_listBase.h"
 #include "DNA_vec_types.h"
 #include "DNA_ID.h"




More information about the Bf-blender-cvs mailing list