Added workarounds and options for gcc 4.6.2

* add -Wno-unused-but-set-variable for gcc 4.6.x with a TODO
* fix warnings about wrong size of pointer cast in ioapic.cpp and AudioBuffer.cpp
This commit is contained in:
Jérôme Duval
2012-01-19 19:44:42 +01:00
parent c40f31867b
commit c59b279b71
4 changed files with 19 additions and 19 deletions
+14 -14
View File
@@ -1185,24 +1185,24 @@ AUTO_SET_UP_CONFIG_VARIABLES +=
# enable -Werror for certain parts of the source tree
if $(HAIKU_GCC_VERSION[1]) = 2 {
rule EnableWerror dirTokens : scope {
AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens) : -Werror
: $(scope) ;
AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens) : -Werror
: $(scope) ;
}
} else {
HAIKU_WERRORFLAGS = ;
if $(HAIKU_GCC_VERSION[1]) >= 4 {
# -Wuninitialized gives too many false positives.
rule EnableWerror dirTokens : scope {
AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens)
: -Werror -Wno-error=uninitialized : $(scope) ;
AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens)
: -Werror -Wno-error=uninitialized : $(scope) ;
HAIKU_WERRORFLAGS = -Wno-error=uninitialized ;
if $(HAIKU_GCC_VERSION[2]) >= 6 {
# TODO: remove the -Wno-unused-but-set-variable option
HAIKU_WERRORFLAGS += -Wno-unused-but-set-variable ;
}
}
rule EnableWerror dirTokens : scope {
AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens)
: -Werror $(HAIKU_WERRORFLAGS) : $(scope) ;
AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens)
: -Werror $(HAIKU_WERRORFLAGS) : $(scope) ;
}
# Work-around for GCC 2 problem -- despite -Wno-multichar it reports
# multichar warnings in headers/private/kernel/debugger_keymaps.h included by
# src/system/kernel/arch/x86/arch_debug_console.cpp.