diff --git a/CMakeLists.txt b/CMakeLists.txt index 26184e674..16feaa950 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,9 @@ if(MSVC) # For some reason on MSVC platform the client and server binaries # become even bigger with IPO enabled. set(AUTO_IPO OFF) +elseif(MINGW AND TARGET_CPU_ARCHITECTURE STREQUAL "x86") + # DWARF error: could not find variable specification and further failures + set(AUTO_IPO OFF) endif() set(AUTO_VULKAN_BACKEND ON) @@ -281,6 +284,7 @@ if(NOT MSVC AND NOT HAIKU) add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wformat=2) # Warn about format strings. add_c_compiler_flag_if_supported(OUR_FLAGS_DEP -Wno-implicit-function-declaration) add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wno-nullability-completeness) # Mac OS build on github + add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wno-tautological-constant-out-of-range-compare) # Check needed for x86, but warns on x86-64 add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wduplicated-cond) add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wduplicated-branches) add_c_compiler_flag_if_supported(OUR_FLAGS_OWN -Wlogical-op) diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp index d5796bdb7..88a3ba1dd 100644 --- a/src/game/client/components/maplayers.cpp +++ b/src/game/client/components/maplayers.cpp @@ -302,15 +302,8 @@ bool CMapLayers::STileLayerVisuals::Init(unsigned int Width, unsigned int Height { m_Width = Width; m_Height = Height; -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#endif if(Width == 0 || Height == 0 || Width >= std::numeric_limits::max() || Height >= std::numeric_limits::max()) return false; -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif m_pTilesOfLayer = new CMapLayers::STileLayerVisuals::STileVisual[Height * Width];