test_snprintf function (tests/test-util.c) tests snprintf with shorter length, but this emit a warning on GCC 7.0 or later.
This commit disables that warning on tests only. Signed-off-by: Timothy Redaelli <tredae...@redhat.com> --- configure.ac | 1 + tests/automake.mk | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 9ef6aad3a..256a3b83d 100644 --- a/configure.ac +++ b/configure.ac @@ -169,6 +169,7 @@ OVS_ENABLE_OPTION([-Wduplicated-cond]) OVS_ENABLE_OPTION([-Qunused-arguments]) OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED]) OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER]) +OVS_CONDITIONAL_CC_OPTION([-Wno-format-truncation], [HAVE_WNO_FORMAT_TRUNCATION]) OVS_ENABLE_WERROR OVS_ENABLE_SPARSE diff --git a/tests/automake.mk b/tests/automake.mk index 3118bbc27..1011acf65 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -364,6 +364,11 @@ tests_ovstest_SOURCES += \ endif tests_ovstest_LDADD = lib/libopenvswitch.la ovn/lib/libovn.la +tests_ovstest_CFLAGS = $(AM_CFLAGS) +if HAVE_WNO_FORMAT_TRUNCATION +tests_ovstest_CFLAGS += -Wno-format-truncation +endif + dist_check_SCRIPTS = tests/flowgen.pl noinst_PROGRAMS += tests/test-strtok_r -- 2.13.0 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev