From 352df24160ab932d4ffac8b4599caed06f831329 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 5 Aug 2022 08:42:09 +0200 Subject: [PATCH] build: Move another warning disable to the build script --- cmake/build_helpers.cmake | 2 +- .../include/hex/helpers/encoding_file.hpp | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index e60e06b41..c16dc5d24 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -369,5 +369,5 @@ function(downloadImHexPatternsFiles dest) endfunction() macro(setupCompilerWarnings target) - target_compile_options(${target} PRIVATE -Wall -Wextra -Werror -Wno-restrict) + target_compile_options(${target} PRIVATE -Wall -Wextra -Werror -Wno-restrict -Wno-stringop-overread) endmacro() \ No newline at end of file diff --git a/lib/libimhex/include/hex/helpers/encoding_file.hpp b/lib/libimhex/include/hex/helpers/encoding_file.hpp index 32e341e4e..05ffa451a 100644 --- a/lib/libimhex/include/hex/helpers/encoding_file.hpp +++ b/lib/libimhex/include/hex/helpers/encoding_file.hpp @@ -2,19 +2,9 @@ #include -// TODO: Workaround for weird issue picked up by GCC 12.1.0 and later. This seems like a compiler bug mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465 -#pragma GCC diagnostic push - - #if (__GNUC__ >= 12) - #pragma GCC diagnostic ignored "-Wrestrict" - #pragma GCC diagnostic ignored "-Wstringop-overread" - #endif - - #include - #include - #include - -#pragma GCC diagnostic pop +#include +#include +#include #include #include