diff make/bsd/makefiles/gcc.make @ 14229:d16be2b85802

8022263: use same Clang warnings on BSD as on Linux Reviewed-by: kvn, iveresov
author twisti
date Tue, 07 Jan 2014 14:26:12 -0800
parents f509b8f4699b
children b6ab2c9abfc5
line wrap: on
line diff
--- a/make/bsd/makefiles/gcc.make	Tue Jan 07 16:02:10 2014 +0100
+++ b/make/bsd/makefiles/gcc.make	Tue Jan 07 14:26:12 2014 -0800
@@ -260,14 +260,13 @@
   WARNINGS_ARE_ERRORS += -Wno-empty-body
 endif
 
-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef
+WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
 
-ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
+ifeq ($(USE_CLANG),)
   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
   # conversions which might affect the values. Only enable it in earlier versions.
-  WARNING_FLAGS = -Wunused-function
-  ifeq ($(USE_CLANG),)
-    WARNING_FLAGS += -Wconversion
+  ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
+    WARNINGS_FLAGS += -Wconversion
   endif
 endif