From 10b5da12dc9757b345a9d6f9daeef9098731ff69 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Wed, 18 Jul 2012 21:09:13 +0300 Subject: Fixed a few compiler warnings, added check. Main code is now compiled (for tests) with -pedantic -Wextra. The test programs are not as strictly bound, but this should improve the chances that atleast the core library compiles with most compilers without warnings. --- tests/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index 8c063f30..5a5d94ab 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -3,6 +3,9 @@ LDFLAGS=--coverage DEPS=../pb_decode.h ../pb_encode.h ../pb.h person.pb.h callbacks.pb.h unittests.h unittestproto.pb.h alltypes.pb.h missing_fields.pb.h TESTS=test_decode1 test_encode1 decode_unittests encode_unittests test_no_messages +# More strict checks for the core part of nanopb +CFLAGS_CORE=-pedantic -Wextra + all: breakpoints $(TESTS) run_unittests clean: @@ -13,9 +16,9 @@ clean: $(CC) $(CFLAGS) -c -o $@ $< pb_encode.o: ../pb_encode.c $(DEPS) - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) $(CFLAGS_CORE) -c -o $@ $< pb_decode.o: ../pb_decode.c $(DEPS) - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) $(CFLAGS_CORE) -c -o $@ $< test_decode1: test_decode1.o pb_decode.o person.pb.o test_decode2: test_decode2.o pb_decode.o person.pb.o -- cgit 1.2.3-korg