From 952b0dc3fdb9db9055a67958135aca3046fd9249 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 13 Jun 2015 10:24:42 +0000 Subject: Updated all makefiles by adding -Wundef. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8029 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/hal/testbuild/Makefile | 4 ++-- test/nil/testbuild/Makefile | 4 ++-- test/rt/testbuild/Makefile | 2 +- test/rt/testbuild/pclint/gcc-include-path.lnt | 12 ++++++------ test/rt/testdyn.c | 12 +++++------- test/rt/testheap.c | 4 ++-- 6 files changed, 18 insertions(+), 20 deletions(-) (limited to 'test') diff --git a/test/hal/testbuild/Makefile b/test/hal/testbuild/Makefile index 36b46326a..8fb265acd 100644 --- a/test/hal/testbuild/Makefile +++ b/test/hal/testbuild/Makefile @@ -180,10 +180,10 @@ AOPT = TOPT = -mthumb -DTHUMB # Define C warning options here -CWARN = -Wall -Wextra -Wstrict-prototypes +CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes # Define C++ warning options here -CPPWARN = -Wall -Wextra +CPPWARN = -Wall -Wextra -Wundef # # Compiler settings diff --git a/test/nil/testbuild/Makefile b/test/nil/testbuild/Makefile index 569f8c152..f3983897b 100644 --- a/test/nil/testbuild/Makefile +++ b/test/nil/testbuild/Makefile @@ -180,10 +180,10 @@ AOPT = TOPT = -mthumb -DTHUMB # Define C warning options here -CWARN = -Wall -Wextra -Wstrict-prototypes +CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes # Define C++ warning options here -CPPWARN = -Wall -Wextra +CPPWARN = -Wall -Wextra -Wundef # # Compiler settings diff --git a/test/rt/testbuild/Makefile b/test/rt/testbuild/Makefile index 143ccbe01..888660393 100644 --- a/test/rt/testbuild/Makefile +++ b/test/rt/testbuild/Makefile @@ -99,7 +99,7 @@ LIBS = $(DLIBS) $(ULIBS) LDFLAGS = -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch -lgcov $(LIBDIR) ASFLAGS = -Wa,-amhls=$(<:.s=.lst) $(ADEFS) -CPFLAGS = $(OPT) -Wall -Wstrict-prototypes -fverbose-asm -Wa,-ahlms=$(<:.c=.lst) $(DEFS) +CPFLAGS = $(OPT) -Wall -Wextra -Wundef -Wstrict-prototypes -fverbose-asm -Wa,-ahlms=$(<:.c=.lst) $(DEFS) # Generate dependency information CPFLAGS += -MD -MP -MF .dep/$(@F).d diff --git a/test/rt/testbuild/pclint/gcc-include-path.lnt b/test/rt/testbuild/pclint/gcc-include-path.lnt index 8bd8f249b..4d7cd42fd 100644 --- a/test/rt/testbuild/pclint/gcc-include-path.lnt +++ b/test/rt/testbuild/pclint/gcc-include-path.lnt @@ -1,6 +1,6 @@ ---i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2014q4/arm-none-eabi/include" ---i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2014q4/arm-none-eabi/include/c++/4.9.3" ---i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2014q4/arm-none-eabi/include/c++/4.9.3/arm-none-eabi" ---i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2014q4/arm-none-eabi/include/c++/4.9.3/backward" ---i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2014q4/lib/gcc/arm-none-eabi/4.9.3/include" ---i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2014q4/lib/gcc/arm-none-eabi/4.9.3/include-fixed" +--i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2015q1/arm-none-eabi/include" +--i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2015q1/arm-none-eabi/include/c++/4.9.3" +--i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2015q1/arm-none-eabi/include/c++/4.9.3/arm-none-eabi" +--i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2015q1/arm-none-eabi/include/c++/4.9.3/backward" +--i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2015q1/lib/gcc/arm-none-eabi/4.9.3/include" +--i"C:/ChibiStudio/tools/GNU Tools ARM Embedded/4.9 2015q1/lib/gcc/arm-none-eabi/4.9.3/include-fixed" diff --git a/test/rt/testdyn.c b/test/rt/testdyn.c index 8dd6d5bf2..7a6cdfb20 100644 --- a/test/rt/testdyn.c +++ b/test/rt/testdyn.c @@ -50,7 +50,7 @@ */ #if CH_CFG_USE_DYNAMIC || defined(__DOXYGEN__) -#if (CH_CFG_USE_HEAP && !CH_CFG_USE_MALLOC_HEAP) || defined(__DOXYGEN__) +#if CH_CFG_USE_HEAP || defined(__DOXYGEN__) static memory_heap_t heap1; #endif #if CH_CFG_USE_MEMPOOLS || defined(__DOXYGEN__) @@ -73,7 +73,7 @@ static THD_FUNCTION(thread, p) { test_emit_token(*(char *)p); } -#if (CH_CFG_USE_HEAP && !CH_CFG_USE_MALLOC_HEAP) || defined(__DOXYGEN__) +#if CH_CFG_USE_HEAP || defined(__DOXYGEN__) static void dyn1_setup(void) { chHeapObjectInit(&heap1, test.buffer, sizeof(union test_buffers)); @@ -180,8 +180,7 @@ ROMCONST struct testcase testdyn2 = { }; #endif /* CH_CFG_USE_MEMPOOLS */ -#if (CH_CFG_USE_HEAP && !CH_CFG_USE_MALLOC_HEAP && CH_CFG_USE_REGISTRY) || \ - defined(__DOXYGEN__) +#if (CH_CFG_USE_HEAP && CH_CFG_USE_REGISTRY) || defined(__DOXYGEN__) /** * @page test_dynamic_003 Registry and References test * @@ -251,14 +250,13 @@ ROMCONST struct testcase testdyn3 = { */ ROMCONST struct testcase * ROMCONST patterndyn[] = { #if CH_CFG_USE_DYNAMIC || defined(__DOXYGEN__) -#if (CH_CFG_USE_HEAP && !CH_CFG_USE_MALLOC_HEAP) || defined(__DOXYGEN__) +#if CH_CFG_USE_HEAP || defined(__DOXYGEN__) &testdyn1, #endif #if CH_CFG_USE_MEMPOOLS || defined(__DOXYGEN__) &testdyn2, #endif -#if (CH_CFG_USE_HEAP && !CH_CFG_USE_MALLOC_HEAP && CH_CFG_USE_REGISTRY) || \ - defined(__DOXYGEN__) +#if (CH_CFG_USE_HEAP && CH_CFG_USE_REGISTRY) || defined(__DOXYGEN__) &testdyn3, #endif #endif diff --git a/test/rt/testheap.c b/test/rt/testheap.c index 6686f8389..b1ab00103 100644 --- a/test/rt/testheap.c +++ b/test/rt/testheap.c @@ -44,7 +44,7 @@ * @brief Heap header file */ -#if (CH_CFG_USE_HEAP && !CH_CFG_USE_MALLOC_HEAP) || defined(__DOXYGEN__) +#if CH_CFG_USE_HEAP || defined(__DOXYGEN__) #define SIZE 16 @@ -152,7 +152,7 @@ ROMCONST struct testcase testheap1 = { * @brief Test sequence for heap. */ ROMCONST struct testcase * ROMCONST patternheap[] = { -#if (CH_CFG_USE_HEAP && !CH_CFG_USE_MALLOC_HEAP) || defined(__DOXYGEN__) +#if CH_CFG_USE_HEAP || defined(__DOXYGEN__) &testheap1, #endif NULL -- cgit v1.2.3