Skip to content

Commit 258fafc

Browse files
JustinStittmasahir0y
authored andcommitted
Makefile.extrawarn: re-enable -Wformat for clang
There's been an ongoing mission to re-enable the -Wformat warning for Clang. A previous attempt at enabling the warning showed that there were many instances of this warning throughout the codebase. The sheer amount of these warnings really polluted builds and thus -Wno-format was added to _temporarily_ toggle them off. After many patches the warning has largely been eradicated for x86, x86_64, arm, and arm64 on a variety of configs. The time to enable the warning has never been better as it seems for the first time we are ahead of them and can now solve them as they appear rather than tackling from a backlog. As to the root cause of this large backlog of warnings, Clang seems to pickup on some more nuanced cases of format warnings caused by implicit integer conversion as well as default argument promotions from printf-like functions. Link: ClangBuiltLinux#378 Suggested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent ee47620 commit 258fafc

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

scripts/Makefile.extrawarn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ else
4747

4848
ifdef CONFIG_CC_IS_CLANG
4949
KBUILD_CFLAGS += -Wno-initializer-overrides
50-
KBUILD_CFLAGS += -Wno-format
5150
KBUILD_CFLAGS += -Wno-sign-compare
5251
KBUILD_CFLAGS += -Wno-format-zero-length
5352
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)

0 commit comments

Comments
 (0)