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
4 changed files with 5 additions and 1 deletions

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)