mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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 <david.chen@osnexus.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #6253
This commit is contained in:
committed by
Brian Behlendorf
parent
cda0317e4d
commit
682ce104cd
@@ -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 += \
|
||||
|
||||
Reference in New Issue
Block a user