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:
parent
937e8f20af
commit
be3ab1876e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350739
@ -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=
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user