summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2017-06-28 10:05:16 -0700
committerBrian Behlendorf <[email protected]>2017-06-28 10:05:16 -0700
commit682ce104cdd80db4b67eea09eb0a90324c5f98ee (patch)
tree3fa2067633f5c089685600f25601af0f791bfcaf /cmd
parentcda0317e4d2a1277b328e4fc42ee3699bbe46c12 (diff)
GCC 7.1 fixes
GCC 7.1 with will warn when we're not checking the snprintf() return code in cases where the buffer could be truncated. This patch either checks the snprintf return code (where applicable), or simply disables the warnings (ztest.c). Reviewed-by: Chunwei Chen <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #6253
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ztest/Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/ztest/Makefile.am b/cmd/ztest/Makefile.am
index a2f3b5a6b..5167d0c1d 100644
--- a/cmd/ztest/Makefile.am
+++ b/cmd/ztest/Makefile.am
@@ -1,6 +1,8 @@
include $(top_srcdir)/config/Rules.am
-AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN)
+# -Wnoformat-truncation to get rid of compiler warning for unchecked
+# truncating snprintfs on gcc 7.1.1.
+AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) $(NO_FORMAT_TRUNCATION)
AM_CPPFLAGS += -DDEBUG
DEFAULT_INCLUDES += \