245 WARNINGS_ARE_ERRORS = -Werror |
245 WARNINGS_ARE_ERRORS = -Werror |
246 endif |
246 endif |
247 |
247 |
248 ifeq ($(USE_CLANG), true) |
248 ifeq ($(USE_CLANG), true) |
249 # However we need to clean the code up before we can unrestrictedly enable this option with Clang |
249 # However we need to clean the code up before we can unrestrictedly enable this option with Clang |
250 WARNINGS_ARE_ERRORS += -Wno-unused-value -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses |
250 WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses |
251 WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-compare |
251 WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-compare |
252 # Not yet supported by clang in Xcode 4.6.2 |
252 # Not yet supported by clang in Xcode 4.6.2 |
253 # WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare |
253 # WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare |
254 WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess |
254 WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess |
255 WARNINGS_ARE_ERRORS += -Wno-empty-body |
255 WARNINGS_ARE_ERRORS += -Wno-empty-body |
260 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" |
260 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" |
261 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit |
261 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit |
262 # conversions which might affect the values. Only enable it in earlier versions. |
262 # conversions which might affect the values. Only enable it in earlier versions. |
263 WARNING_FLAGS = -Wunused-function |
263 WARNING_FLAGS = -Wunused-function |
264 ifeq ($(USE_CLANG),) |
264 ifeq ($(USE_CLANG),) |
265 WARNINGS_FLAGS += -Wconversion |
265 WARNING_FLAGS += -Wconversion |
266 endif |
266 endif |
267 endif |
267 endif |
268 |
268 |
269 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS) |
269 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS) |
270 # Special cases |
270 # Special cases |