From: Sodagudi Prasad <psodagud@codeaurora.org>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: gregkh@linuxfoundation.org, mmarek@suse.com,
ghackmann@google.com, yamada.masahiro@socionext.com,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kbuild: clang: Disable -Wunused-const-variable warnings
Date: Mon, 29 Jan 2018 08:35:38 -0800 [thread overview]
Message-ID: <fd6fdda6c0080e72598eabd2c88d7df6@codeaurora.org> (raw)
In-Reply-To: <20180128162239.GZ21977@gate.crashing.org>
On 2018-01-28 08:22, Segher Boessenkool wrote:
> On Fri, Jan 26, 2018 at 04:59:46PM -0800, Prasad Sodagudi wrote:
>> Disable -Wunused-const-variable warnings instead of
>> disabling -Wunused-variable warnings, So that in both
>> clang and GCC -Wunused-const-variable gets disabled.
>
> Why would you disable -Wunused-const-variable on GCC? You do not
> explain why.
Hi Segher,
Please check below discussion with Greg and Masahiro about
"unused-variable".
https://lkml.org/lkml/2017/12/18/697
Please check this link, "unused-const-variable" warning is already
disabled for GCC.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?h=v4.15#n719
Below commit is disabling the "unused-const-variable" for GCC.
commit - c9c6837d39311b0c - "kbuild: move -Wunused-const-variable to
W=1 warning level"
Currently "unused-variable" warnings are disabled for clang and not for
the gcc. Disabling of
"unused-variable" warning also disables "unused-const-variable" warning.
To match same settings
between clang and gcc, disabling "unused-const-variable" warnings for
clang as well.
So with this patch, keeping the same settings for GCC and CLANG with
respect to "unused-const-variable".
-Thanks, Prasad
>
>
> Segher
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum,
Linux Foundation Collaborative Project
next prev parent reply other threads:[~2018-01-29 16:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 21:24 unused-variable warning is getting disabled with clang Sodagudi Prasad
2017-12-07 6:26 ` Greg Kroah-Hartman
2017-12-08 2:16 ` Sodagudi Prasad
2017-12-18 15:32 ` Masahiro Yamada
2018-01-27 0:59 ` [PATCH] kbuild: clang: Disable -Wunused-const-variable warnings Prasad Sodagudi
2018-01-28 16:22 ` Segher Boessenkool
2018-01-29 16:35 ` Sodagudi Prasad [this message]
2018-01-29 17:08 ` Prasad Sodagudi
2018-01-29 23:57 ` Segher Boessenkool
2018-02-02 16:01 ` Masahiro Yamada
2018-02-06 23:46 ` [PATCH] kbuild: clang: disable unused variable warnings only when constant Prasad Sodagudi
2018-02-07 0:22 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd6fdda6c0080e72598eabd2c88d7df6@codeaurora.org \
--to=psodagud@codeaurora.org \
--cc=ghackmann@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.com \
--cc=segher@kernel.crashing.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox