diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2012-09-02 19:54:35 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2012-09-02 19:54:35 +0300 |
commit | f187aad63db2ff8e1a82508f4a43988b43e10f54 (patch) | |
tree | f96a9fd999fb178a815d6d73d581d618896f064b | |
parent | a06dba6e49a7fc5fbc1e476539566e3f407be908 (diff) |
Fix -Wextra warning in generated .pb.c files.
Compile the generated files with the same extra-strict
settings as the core, in order to detect problems in tests.
Update issue 32
Status: FixedInGit
-rw-r--r-- | pb.h | 2 | ||||
-rw-r--r-- | tests/Makefile | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -194,7 +194,7 @@ typedef enum { #define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0])) #define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2)) #define pb_delta_end(st, m1, m2) (offsetof(st, m1) - offsetof(st, m2) - pb_membersize(st, m2)) -#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0} +#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0,0,0,0} /* These macros are used for giving out error messages. * They are mostly a debugging aid; the main error information diff --git a/tests/Makefile b/tests/Makefile index 3810c95..e4c67c5 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -11,6 +11,9 @@ all: breakpoints $(TESTS) run_unittests clean: rm -f $(TESTS) person.pb* alltypes.pb* *.o *.gcda *.gcno +%.pb.o: %.pb.c %.pb.h + $(CC) $(CFLAGS) $(CFLAGS_CORE) -c -o $@ $< + %.o: %.c %.o: %.c $(DEPS) $(CC) $(CFLAGS) -c -o $@ $< |