From: Arnd Bergmann <arnd@arndb.de>
To: Borislav Petkov <bp@alien8.de>
Cc: Sam Ravnborg <sam@ravnborg.org>, Michal Marek <mmarek@suse.cz>,
torvalds@linux-foundation.org, x86@kernel.org,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
linux-kbuild@vger.kernel.org, bp@amd64.org
Subject: Re: [PATCH -v4] kbuild: Add extra gcc checks
Date: Tue, 1 Mar 2011 12:35:00 +0100 [thread overview]
Message-ID: <201103011235.00389.arnd@arndb.de> (raw)
In-Reply-To: <20110228213134.GA10825@liondog.tnic>
On Monday 28 February 2011, Borislav Petkov wrote:
> My intention was not to have multiple levels of warnings because then
> you have to go and enable the different levels and have to remember
> which level you used last, etc, etc.
I wasn't suggesting more than two, so the two would have very distinct
definitions:
W=1: Warnings that we would like to fix all over the tree, patches to
remove these are always welcome and you can build the entire kernel
with it. Once they are all fixed, we can make the warnings the default.
W=2: Warnings that we know we don't always want to fix, meant for what
you describe here -- you build a single file and decide what to
do based on common sense.
> Instead I am thinking along with the following lines:
>
> make W=1 [path/to/kernel/file.o] 2>w.log
>
> and then take a look at w.log and start fixing warnings.
>
> You can selectively ignore some of the warnings since, as you say
> yourself above, some simply make you write ugly code like enforcing
> casts just for the sake of shutting up the compiler. A great deal of the
> warnings come from includes which are hard to fix or gcc is issuing the
> warning wrong since we do sick sh*t with C in the kernel and that's OK
> :).
Yes, I understand that.
> But in all cases you have all the warnings in one single file and that's
> it. If a certain -W option is useless, we should rather remove it since
> it doesn't help anyway. The selection above is clearly not complete so
> I'd rather drop some instead of including different W=x levels.
>
> Hmm... ?
I'd have to see the output myself. My feeling is that a lot of the
-Wextra warnings are not that useful, but I don't know which ones
are included in -Wextra these days.
Arnd
next prev parent reply other threads:[~2011-03-01 11:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 11:03 [PATCH -v4] kbuild: Add extra gcc checks Borislav Petkov
2011-02-28 18:24 ` Borislav Petkov
2011-02-28 18:38 ` Sam Ravnborg
2011-02-28 21:07 ` Arnd Bergmann
2011-02-28 21:31 ` Borislav Petkov
2011-03-01 11:35 ` Arnd Bergmann [this message]
2011-03-01 13:20 ` Américo Wang
2011-03-01 14:56 ` Borislav Petkov
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=201103011235.00389.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=bp@amd64.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mmarek@suse.cz \
--cc=sam@ravnborg.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.