lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 16 Jul 2022 17:45:32 +0900
From:   Youngmin Nam <youngmin.nam@...sung.com>
To:     masahiroy@...nel.org, michal.lkml@...kovi.net,
        ndesaulniers@...gle.com
Cc:     linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        hosung0.kim@...sung.com, d7271.choe@...sung.com,
        Youngmin Nam <youngmin.nam@...sung.com>
Subject: [PATCH] Makefile.extrawarn: add -Wformat-insufficient-args for
 clang build

The -Wformat-insufficient-args for clang is useful to detect the situation
when the total number is unmatched between format specifiers and arguments.

Originally, this option is enabled by default(Link[1]), but it is disabled by
-Wno-format explicitly so that we can't detect this unmatched situation.

We can enable it by adding this option after -Wno-format.

Link[1]: https://releases.llvm.org/13.0.0/tools/clang/docs/DiagnosticsReference.html#wformat-insufficient-args
Signed-off-by: Youngmin Nam <youngmin.nam@...sung.com>
---
 scripts/Makefile.extrawarn | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index f5f0d6f09053..c23d7c286bad 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -48,6 +48,7 @@ else
 ifdef CONFIG_CC_IS_CLANG
 KBUILD_CFLAGS += -Wno-initializer-overrides
 KBUILD_CFLAGS += -Wno-format
+KBUILD_CFLAGS += -Wformat-insufficient-args
 KBUILD_CFLAGS += -Wno-sign-compare
 KBUILD_CFLAGS += -Wno-format-zero-length
 KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
-- 
2.34.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ