Backport GCC 8 fixes to 2.1

Backported the minimal set of changes required to build 2.1 with GCC
8. The format-truncation and format-overflow warnings are disabled instead
of fixed in 2.1 to remove duplication of effort that was already done in
2.2 (the commit doesn't cherry-pick cleanly).
This commit is contained in:
Markus Mäkelä 2018-05-15 19:43:32 +03:00
parent 05a6f12c63
commit 46d1187172
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
4 changed files with 5 additions and 1 deletions

View File

@ -39,12 +39,12 @@
#include <execinfo.h>
#include <ftw.h>
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <unistd.h>
#include <getopt.h>
#include <ini.h>
#include <openssl/opensslconf.h>

View File

@ -28,6 +28,7 @@
#include <stdio.h>
#include <errno.h>
#include <sys/stat.h>
#include <getopt.h>
#include <maxscale/paths.h>
#include <maxscale/log_manager.h>

View File

@ -6,6 +6,7 @@ if(AVRO_FOUND AND JANSSON_FOUND)
set_target_properties(avrorouter PROPERTIES LINK_FLAGS -Wl,-z,defs)
target_link_libraries(avrorouter maxscale-common ${JANSSON_LIBRARIES} ${AVRO_LIBRARIES} maxavro sqlite3 lzma)
install_module(avrorouter core)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format-overflow -Wno-format-truncation")
if (BUILD_TESTS)
add_subdirectory(test)

View File

@ -9,6 +9,8 @@ target_link_libraries(maxbinlogcheck maxscale-common ${PCRE_LINK_FLAGS} uuid)
install_executable(maxbinlogcheck core)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format-overflow -Wno-format-truncation")
if(BUILD_TESTS)
add_subdirectory(test)
endif()