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.
This commit is contained in:
cem 2019-08-08 03:27:46 +00:00
parent 0e244c1b3c
commit 6d9426996c
2 changed files with 7 additions and 2 deletions

View File

@ -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=

View File

@ -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
@ -80,6 +79,9 @@ 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.
.if ${MK_FORMAT_EXTENSIONS} == "no"