Date: Fri, 18 Dec 2020 08:40:33 +0000 (UTC) From: Ryan Libby <rlibby@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368753 - in stable/12: share/mk sys/conf Message-ID: <202012180840.0BI8eXlj058393@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rlibby Date: Fri Dec 18 08:40:33 2020 New Revision: 368753 URL: https://svnweb.freebsd.org/changeset/base/368753 Log: MFC r350739-r350740 (by cem) r350739: 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. r350740: r350739 try #2 For some inexplicable reason, C++ compilers reject the -Wno- flag, and also (ab)use CWARNFLAGS. Reported by: imp Modified: stable/12/share/mk/bsd.sys.mk stable/12/sys/conf/kern.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/share/mk/bsd.sys.mk ============================================================================== --- stable/12/share/mk/bsd.sys.mk Fri Dec 18 08:29:38 2020 (r368752) +++ stable/12/share/mk/bsd.sys.mk Fri Dec 18 08:40:33 2020 (r368753) @@ -201,6 +201,9 @@ FORMAT_EXTENSIONS= -fformat-extensions CWARNFLAGS+= -Wno-unknown-pragmas .endif # IGNORE_PRAGMA +# This warning is utter nonsense +CFLAGS+= -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: stable/12/sys/conf/kern.mk ============================================================================== --- stable/12/sys/conf/kern.mk Fri Dec 18 08:29:38 2020 (r368752) +++ stable/12/sys/conf/kern.mk Fri Dec 18 08:40:33 2020 (r368753) @@ -86,6 +86,9 @@ NO_WCAST_QUAL= -Wno-cast-qual .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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012180840.0BI8eXlj058393>