[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9C9DCC69-1F75-4241-A022-FFB9B6A11AC5@intel.com>
Date: Mon, 22 Sep 2014 21:50:44 +0000
From: "Rustad, Mark D" <mark.d.rustad@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: "sparse@...isli.org" <sparse@...isli.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"richard.weinberger@...il.com" <richard.weinberger@...il.com>,
"linux-sparse@...r.kernel.org" <linux-sparse@...r.kernel.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
"computersforpeace@...il.com" <computersforpeace@...il.com>
Subject: Re: [PATCH] sched: Remove nested extern
On Sep 22, 2014, at 2:21 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Mon, Sep 22, 2014 at 08:59:32PM +0000, Rustad, Mark D wrote:
>> Because I have found that enabling many warnings helps identify problems
>> in code and it has been my standard practice since about 1999 to do so.
>> The compiler warnings are really just another form of static analysis,
>> and I use it routinely on every compile. Here is how routinely: I have
>> W=1 in my environment, W=12 is just too painful. I would change that
>> default to W=12 if it wasn't insane to do so.
>
> Many warnings are just plain insane and stupid. They're not helping
> anybody. There's a very good reason many are disabled. I'm sure you can
> find some entertaining discussions on the topic if you search the LKML
> archives.
That is what I used to think. -Wshadow for example. What's the problem? It
is perfectly valid C. Well, I recently sent a patch that changed some
function parameters that used the name jiffies, which of course shadowed
the well-known global. If a macro were ever called in those functions
whose expansion ever tried to access jiffies, well it wouldn't do what
was expected. Not a bug now, but a trap for the future. I only found that
because I either resolved or silenced enough warnings to see something interesting.
Over the years I think I have resolved real bugs revealed by probably nearly
every one of the additional warning messages. They do have value, but that
value is typically lost if the norm is a flood of messages. Apple would not
have had their SSL problem if they had had -Wunreachable-code enabled and
noticed the message.
--
Mark Rustad, Networking Division, Intel Corporation
Download attachment "signature.asc" of type "application/pgp-signature" (842 bytes)
Powered by blists - more mailing lists