diff --git a/cmd/Makefile.am b/cmd/Makefile.am index 6d6de4adb4..2bd9d039f2 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -39,8 +39,6 @@ zhack_LDADD = \ ztest_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) -# Get rid of compiler warning for unchecked truncating snprintfs on gcc 7.1.1 -ztest_CFLAGS += $(NO_FORMAT_TRUNCATION) ztest_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS) sbin_PROGRAMS += ztest diff --git a/config/Rules.am b/config/Rules.am index 2e463ae608..30c5f353cd 100644 --- a/config/Rules.am +++ b/config/Rules.am @@ -21,7 +21,9 @@ AM_CFLAGS += $(IMPLICIT_FALLTHROUGH) AM_CFLAGS += $(DEBUG_CFLAGS) AM_CFLAGS += $(ASAN_CFLAGS) AM_CFLAGS += $(UBSAN_CFLAGS) -AM_CFLAGS += $(CODE_COVERAGE_CFLAGS) $(NO_FORMAT_ZERO_LENGTH) +AM_CFLAGS += $(CODE_COVERAGE_CFLAGS) +AM_CFLAGS += $(NO_FORMAT_ZERO_LENGTH) +AM_CFLAGS += $(NO_FORMAT_TRUNCATION) if BUILD_FREEBSD AM_CFLAGS += -fPIC -Werror -Wno-unknown-pragmas -Wno-enum-conversion AM_CFLAGS += -include $(top_srcdir)/include/os/freebsd/spl/sys/ccompile.h