svn commit: r350739 - in head: share/mk sys/conf
Conrad Meyer
cem at FreeBSD.org
Thu Aug 8 03:27:47 UTC 2019
Author: cem
Date: Thu Aug 8 03:27:46 2019
New Revision: 350739
URL: https://svnweb.freebsd.org/changeset/base/350739
Log:
Disable useless -Wformat-zero-length
It is part of -Wformat, which is enabled by -Wall. Empty format strings are
well defined and it is perfectly reasonable to expect them in a formatting
interface.
Modified:
head/share/mk/bsd.sys.mk
head/sys/conf/kern.mk
Modified: head/share/mk/bsd.sys.mk
==============================================================================
--- head/share/mk/bsd.sys.mk Thu Aug 8 03:18:35 2019 (r350738)
+++ head/share/mk/bsd.sys.mk Thu Aug 8 03:27:46 2019 (r350739)
@@ -186,6 +186,9 @@ FORMAT_EXTENSIONS= -fformat-extensions
CWARNFLAGS+= -Wno-unknown-pragmas
.endif # IGNORE_PRAGMA
+# This warning is utter nonsense
+CWARNFLAGS+= -Wno-format-zero-length
+
# We need this conditional because many places that use it
# only enable it for some files with CLFAGS.$FILE+=${CLANG_NO_IAS}.
# unconditionally, and can't easily use the CFLAGS.clang=
Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk Thu Aug 8 03:18:35 2019 (r350738)
+++ head/sys/conf/kern.mk Thu Aug 8 03:27:46 2019 (r350739)
@@ -61,8 +61,7 @@ CWARNEXTRA?= -Wno-error=address \
CWARNEXTRA+= -Wno-error=misleading-indentation \
-Wno-error=nonnull-compare \
-Wno-error=shift-overflow \
- -Wno-error=tautological-compare \
- -Wno-format-zero-length
+ -Wno-error=tautological-compare
.endif
.if ${COMPILER_VERSION} >= 70200
CWARNEXTRA+= -Wno-error=memset-elt-size
@@ -79,6 +78,9 @@ NO_WCAST_QUAL= -Wno-cast-qual
NO_WNONNULL= -Wno-nonnull
.endif
.endif
+
+# This warning is utter nonsense
+CWARNFLAGS+= -Wno-format-zero-length
# External compilers may not support our format extensions. Allow them
# to be disabled. WARNING: format checking is disabled in this case.
More information about the svn-src-all
mailing list