Skip to contentSkip to conversation

scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length

PATCH In review Nathan Chancellor 2 participants 2 messages Aug 10, 2022 – Aug 17, 2022 Kbuild

lore
Share & tools
lore

Nathan Chancellor

author maintainer
#0 lore raw

PATCH 1/1 scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length

There are no instances of this warning in the tree across several difference architectures and configurations. This was added by commit 26ea6bb1fef0 ("kbuild, LLVMLinux: Supress warnings unless W=1-3") back in 2014, where it might have been necessary, but there are no instances of it now so stop disabling it to increase warning coverage for clang.

---
 scripts/Makefile.extrawarn | 1 -
 1 file changed, 1 deletion(-)
scripts/Makefile.extrawarn +0 -1
index 9bbaf7112a9b..69cec45c4e71 100644
@@ -48,7 +48,6 @@ else
 ifdef CONFIG_CC_IS_CLANG
 KBUILD_CFLAGS += -Wno-initializer-overrides
 KBUILD_CFLAGS += -Wno-sign-compare
-KBUILD_CFLAGS += -Wno-format-zero-length
 KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
 KBUILD_CFLAGS += -Wno-tautological-constant-out-of-range-compare
 KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access)

base-commit: aeb6e6ac18c73ec287b3b1e2c913520699358c13

Signature · 1 line
2.37.1
#1 lore raw
Quoted 10 lines · Nathan Chancellor

There are no instances of this warning in the tree across several difference architectures and configurations. This was added by commit 26ea6bb1fef0 ("kbuild, LLVMLinux: Supress warnings unless W=1-3") back in 2014, where it might have been necessary, but there are no instances of it now so stop disabling it to increase warning coverage for clang.

---

Applied to linux-kbuild/fixes. Thanks.

Quoted 20 lines
 scripts/Makefile.extrawarn | 1 -
 1 file changed, 1 deletion(-)
scripts/Makefile.extrawarn +0 -1
index 9bbaf7112a9b..69cec45c4e71 100644
@@ -48,7 +48,6 @@ else
 ifdef CONFIG_CC_IS_CLANG
 KBUILD_CFLAGS += -Wno-initializer-overrides
 KBUILD_CFLAGS += -Wno-sign-compare
-KBUILD_CFLAGS += -Wno-format-zero-length
 KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
 KBUILD_CFLAGS += -Wno-tautological-constant-out-of-range-compare
 KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access)

base-commit: aeb6e6ac18c73ec287b3b1e2c913520699358c13 --
2.37.1

Signature · 2 lines
Best Regards
Masahiro Yamada