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 <tredaelli@redhat.com>
Acked-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Russell Bryant <russell@ovn.org>
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
OVS_CTAGS_IDENTIFIERS
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