]> git.proxmox.com Git - ovs.git/commitdiff
tests: Disable no-format-truncation warnings
authorTimothy Redaelli <tredaelli@redhat.com>
Thu, 13 Jul 2017 14:29:33 +0000 (16:29 +0200)
committerRussell Bryant <russell@ovn.org>
Sat, 15 Jul 2017 01:09:31 +0000 (21:09 -0400)
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>
configure.ac
tests/automake.mk

index 23afe4c7129ddb988e5cf3363ed49e6d47fca8c4..ab002a0a0956293eadf282463597b3db938855fd 100644 (file)
@@ -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
 OVS_CTAGS_IDENTIFIERS
index 3118bbc278b790b5a8dbd19ff7c663e4c555921d..1011acf6582dd10dbc0854fca15e8d94cd42e31b 100644 (file)
@@ -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