From 57dbedf59daa6d0e56161a0463b44e05ea10d567 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 1 Jul 2012 22:11:35 +0000 Subject: [PATCH] Makefile.common: add a couple of C warning flags. Most notably, -Wdeclaration-after-statement. This and -Wpointer-arith give some warning on linux, but this is "harmless" as it's assumed that we'll be always compiling with GCC or Clang there. Also, erratum in the "Make ksqrt take uint32_t ..." commit: hypotenuse -> squared length of the hypotenuse git-svn-id: https://svn.eduke32.com/eduke32@2797 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile.common | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index 06b5846b2..e5372345b 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -171,10 +171,18 @@ else W_NO_UNUSED_RESULT := endif -BASECFLAGS=$(debug) -W -Wall -Werror-implicit-function-declaration \ +CWARNS := -W -Wall -Wdeclaration-after-statement -Werror-implicit-function-declaration \ + -Wpointer-arith \ + -Wextra \ + #-Wstrict-prototypes \ + #-Waggregate-return \ + #-Wwrite-strings \ + #-Wcast-qual -Wcast-align \ + #-Waddress -Wlogical-op + +BASECFLAGS=$(debug) $(CWARNS) \ -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \ - $(F_JUMP_TABLES) $(W_NO_UNUSED_RESULT) $(ARCH) \ - -Wextra #-Wwrite-strings -Waddress -Wlogical-op + $(F_JUMP_TABLES) $(W_NO_UNUSED_RESULT) $(ARCH) ifneq (0,$(CLANG)) BASECFLAGS+= -Wno-unused-value -Wno-parentheses endif