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
+12 -12
View File
@@ -1185,22 +1185,22 @@ 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.
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 -Wno-error=uninitialized : $(scope) ;
: -Werror $(HAIKU_WERRORFLAGS) : $(scope) ;
AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens)
: -Werror -Wno-error=uninitialized : $(scope) ;
}
: -Werror $(HAIKU_WERRORFLAGS) : $(scope) ;
}
# Work-around for GCC 2 problem -- despite -Wno-multichar it reports
+1 -1
View File
@@ -144,7 +144,7 @@ copy_headers $haikuSourceDir/headers/posix $tmpIncludeDir/posix
cd $gccObjDir
CFLAGS="-O2" CXXFLAGS="-O2" $gccSourceDir/configure --prefix=$installDir \
--target=$haikuMachine --disable-nls --disable-shared \
--enable-languages=c,c++ \
--enable-languages=c,c++ --enable-lto --enable-frame-pointer \
--with-headers=$tmpIncludeDir --with-libs=$tmpLibDir \
$gccConfigureArgs || exit 1
@@ -223,8 +223,8 @@ uint32 AudioBuffer::copyTo(
// convert and copy a sample at a time
for(; remaining; remaining -= sampleSize) {
convert_sample(
(void*) *((int8*)m_pData + fromOffset),
(void*) *((int8*)target.m_pData + targetOffset),
(void*) ((int8*)m_pData + fromOffset),
(void*) ((int8*)target.m_pData + targetOffset),
m_format.format,
target.m_format.format);
+2 -2
View File
@@ -529,8 +529,8 @@ acpi_configure_source_overrides(acpi_table_madt* madt)
if (info->SourceIrq != info->GlobalIrq) {
// we need a vector mapping
install_io_interrupt_handler(info->GlobalIrq,
&ioapic_source_override_handler, (void*)info->SourceIrq,
B_NO_ENABLE_COUNTER);
&ioapic_source_override_handler,
(void*)(addr_t)info->SourceIrq, B_NO_ENABLE_COUNTER);
sSourceOverrides[info->SourceIrq] = info->GlobalIrq;
}