mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
BUILD: Suppress stringop-overflow and stringop-truncation GCC warnings
Too many false-positives.
This commit is contained in:
committed by
Filippos Karapetis
parent
3e33c8908d
commit
e472be2ee4
@@ -2383,6 +2383,12 @@ if test "$have_gcc" = yes; then
|
||||
|
||||
if test $_cxx_major -ge 5; then
|
||||
append_var CXXFLAGS "-Wshadow"
|
||||
if test $_cxx_major -ge 7; then
|
||||
append_var CXXFLAGS "-Wno-stringop-overflow"
|
||||
if test $_cxx_major -ge 8; then
|
||||
append_var CXXFLAGS "-Wno-stringop-truncation"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
append_var CXXFLAGS "-Wno-missing-field-initializers"
|
||||
|
||||
|
||||
@@ -349,8 +349,16 @@ void CMakeProvider::writeWarnings(std::ofstream &output) const {
|
||||
output << ' ' << warning;
|
||||
}
|
||||
output << "\")\n";
|
||||
output << "\tif(CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)\n";
|
||||
output << "\t\tset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member\")\n";
|
||||
output << "\tif(CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\")\n";
|
||||
output << "\t\tif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.1)\n";
|
||||
output << "\t\t\tset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -Wno-stringop-overflow\")\n";
|
||||
output << "\t\tendif()\n";
|
||||
output << "\t\tif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.1)\n";
|
||||
output << "\t\t\tset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -Wno-stringop-truncation\")\n";
|
||||
output << "\t\tendif()\n";
|
||||
output << "\t\tif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)\n";
|
||||
output << "\t\t\tset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member\")\n";
|
||||
output << "\t\tendif()\n";
|
||||
output << "\tendif()\n";
|
||||
output << "endif()\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user