Browse Source

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.
tags/v1.8.0
Xerbo 4 years ago
parent
commit
06571464fe
2 changed files with 1 additions and 4 deletions
  1. +1
    -1
      CMakeLists.txt
  2. +0
    -3
      src/pngio.c

+ 1
- 1
CMakeLists.txt View File

@@ -14,7 +14,7 @@ target_link_libraries(aptdec PRIVATE m)


# Throw errors on warnings on release builds # Throw errors on warnings on release builds
if(CMAKE_BUILD_TYPE MATCHES "Release") 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() else()
target_compile_options(aptdec PRIVATE -Wall -Wextra -pedantic) target_compile_options(aptdec PRIVATE -Wall -Wextra -pedantic)
endif() endif()


+ 0
- 3
src/pngio.c View File

@@ -26,9 +26,6 @@


#include "pngio.h" #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) { int mapOverlay(char *filename, rgb_t **crow, int nrow, int zenith, int MCIR) {
FILE *fp = fopen(filename, "rb"); FILE *fp = fopen(filename, "rb");
if(!fp) { if(!fp) {


Loading…
Cancel
Save