linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Behan Webster <behanw@converseincode.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	dwmw2@infradead.org, "Jan-Simon Möller" <dl9pf@gmx.de>,
	"Mark Charlebois" <charlebm@gmail.com>,
	bp@alien8.de
Subject: Re: [PATCH v2] kbuild, LLVMLinux: Supress warnings unless W=1-3
Date: Thu, 31 Jul 2014 22:46:45 +0200	[thread overview]
Message-ID: <53DAAB35.8080206@suse.cz> (raw)
In-Reply-To: <53DA6AFC.3060002@converseincode.com>

Dne 31.7.2014 18:12, Behan Webster napsal(a):
> On 07/31/14 01:18, Michal Marek wrote:
>> Dne 31.7.2014 06:16, behanw@converseincode.com napsal(a):
>>> @@ -55,6 +45,18 @@ warning-3 += -Wswitch-default
>>>   warning-3 += $(call cc-option, -Wpacked-bitfield-compat)
>>>   warning-3 += $(call cc-option, -Wvla)
>>>   +ifeq ($(COMPILER),clang)
>>> +ifndef $(W)
>>> +KBUILD_CFLAGS += $(call cc-disable-warning, initializer-overrides)
>>> +KBUILD_CFLAGS += $(call cc-disable-warning, unused-value)
>>> +KBUILD_CFLAGS += $(call cc-disable-warning, format)
>>> +KBUILD_CFLAGS += $(call cc-disable-warning, unknown-warning-option)
>>> +KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare)
>>> +KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length)
>>> +KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized)
>>> +endif
>>> +endif
>>> +
>> Please remove this part, it has no effect. I assume that if it works for
>> you, these warning are not as annoying so they do not need to be
>> disabled?
> Actually they are annoying, that's why they're disabled normally. Most
> of them complain about practices which are relatively common in kernel
> code.
> 
> clang warns about a lot more things than gcc does. It means that code
> which compiles cleanly in gcc often doesn't with clang. This cuts out
> the warnings which are unlikely to to be fixed in kernel code anytime
> soon, but which are probably worth exposing when W=1 is used.
> 
> This part of the patch explicitly deals with complaints from some in the
> kernel community that clang is too noisy with kernel code.
> 
> This part of the patch needs to be somewhere. This seemed the best place.

You placed it inside a branch that is only evaluated when W= is given.

Michal

  reply	other threads:[~2014-07-31 20:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 13:07 3d3d6b847420 ("kbuild: LLVMLinux: Adapt warnings for compilation with clang") Borislav Petkov
2014-06-16 15:29 ` PaX Team
2014-06-16 15:48   ` Jan-Simon Möller
2014-06-29 20:13     ` Borislav Petkov
2014-07-01  0:42       ` [PATCH] kbuild, LLVMLinux: only use warnings when using clang behanw
2014-07-01 10:12         ` Borislav Petkov
2014-07-30 13:04           ` Michal Marek
2014-07-30 21:39             ` Behan Webster
2014-07-31  4:16             ` [PATCH v2] kbuild, LLVMLinux: Supress warnings unless W=1-3 behanw
2014-07-31  8:18               ` Michal Marek
2014-07-31 16:12                 ` Behan Webster
2014-07-31 20:46                   ` Michal Marek [this message]
2014-08-01  4:07                     ` Behan Webster
2014-08-01  4:08                     ` [PATCH v3] " behanw
2014-08-05 13:42                       ` Michal Marek

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=53DAAB35.8080206@suse.cz \
    --to=mmarek@suse.cz \
    --cc=behanw@converseincode.com \
    --cc=bp@alien8.de \
    --cc=charlebm@gmail.com \
    --cc=dl9pf@gmx.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).