From e2bf6eacb37cbc1ac44ae04d0f4a704556930151 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Oct 2012 09:20:58 +0000 Subject: use GCC's -Wpadded on DNA files, gives more useful warnings then makesdna. --- source/blender/makesdna/DNA_curve_types.h | 2 +- source/blender/makesdna/intern/makesdna.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 284694f2b48..9fbe045226e 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -74,7 +74,7 @@ typedef struct Path { 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. */ diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index fec3aa22e92..88c5ea3e910 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -1187,6 +1187,13 @@ int main(int argc, char **argv) } /* 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" -- cgit v1.2.3