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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1517014786-30685-1-git-send-email-psodagud@codeaurora.org>
Date:   Fri, 26 Jan 2018 16:59:46 -0800
From:   Prasad Sodagudi <psodagud@...eaurora.org>
To:     gregkh@...uxfoundation.org, mmarek@...e.com, ghackmann@...gle.com,
        yamada.masahiro@...ionext.com
Cc:     psodagud@...eaurora.org, linux-kbuild@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] kbuild: clang: Disable -Wunused-const-variable warnings

Disable -Wunused-const-variable warnings instead of
disabling -Wunused-variable warnings, So that in both
clang and GCC -Wunused-const-variable gets disabled.

Currently with clang -Wunused-variable warnings are
disabled and with gcc -Wunused-variable warnings are
enabled, with this setting all unused local variable
would be warned in clang as well.

Signed-off-by: Prasad Sodagudi <psodagud@...eaurora.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 339397b..c730338 100644
--- a/Makefile
+++ b/Makefile
@@ -698,7 +698,6 @@ KBUILD_CFLAGS += $(stackp-flag)
 
 ifeq ($(cc-name),clang)
 KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
-KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable)
 KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
 KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
 KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
@@ -719,6 +718,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
 KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
 endif
 
+KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
 ifdef CONFIG_FRAME_POINTER
 KBUILD_CFLAGS	+= -fno-omit-frame-pointer -fno-optimize-sibling-calls
 else
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ