From 06571464fe0d1f7c824b99373249889fe10af3a6 Mon Sep 17 00:00:00 2001 From: Xerbo Date: Thu, 3 Sep 2020 15:37:00 +0100 Subject: [PATCH] Make release builds work Since release builds had -Werror on, every warning is counted as an error, and the #pragmas that supressed that warning caused a wrning them selfs. --- CMakeLists.txt | 2 +- src/pngio.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa3b376..7894e61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ target_link_libraries(aptdec PRIVATE m) # Throw errors on warnings on release builds if(CMAKE_BUILD_TYPE MATCHES "Release") - target_compile_options(aptdec PRIVATE -Wall -Wextra -pedantic -Werror) + target_compile_options(aptdec PRIVATE -Wall -Wextra -pedantic -Wno-missing-field-initializers -Werror) else() target_compile_options(aptdec PRIVATE -Wall -Wextra -pedantic) endif() diff --git a/src/pngio.c b/src/pngio.c index 7b6d07b..aa9b945 100644 --- a/src/pngio.c +++ b/src/pngio.c @@ -26,9 +26,6 @@ #include "pngio.h" -#pragma GCC diagnostic ignored "-Wmissing-field-initializers" -#pragma clang diagnostic ignored "-Wmissing-field-initializers" - int mapOverlay(char *filename, rgb_t **crow, int nrow, int zenith, int MCIR) { FILE *fp = fopen(filename, "rb"); if(!fp) {