From: "John Kacur" <jkacur@gmail.com>
To: "Guennadi Liakhovetski" <g.liakhovetski@gmx.de>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
LKML <linux-kernel@vger.kernel.org>,
"Andy Whitcroft" <apw@shadowen.org>,
rdunlap@xenotime.net, jschopp@austin.ibm.com
Subject: Re: drop overzealous ERROR: do not initialise statics to 0 or NULL from checkpatch.pl
Date: Thu, 14 Aug 2008 10:42:55 +0200 [thread overview]
Message-ID: <520f0cf10808140142m387f59faka4287aef7d18a7ae@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0808132216460.7713@axis700.grange>
On Wed, Aug 13, 2008 at 10:19 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> On Wed, 13 Aug 2008, John Kacur wrote:
>
>> Could we drop this somewhat overzealous "ERROR: do not initialise
>> statics to 0 or NULL" from checkpatch.pl?
>>
>> Reasoning:
>> 1. This is not part of Documentation/CodingStyle
>> 2. K&R 2nd.ed do it (pg 83, static int bufp = 0;) The purpose is to
>> remove access to the bufp from external routines, and to avoid name
>> conflict)
>
> No, "static" "removes access to the bufp from external routines, and
> avoids name conflict", not the initialization to 0.
>
That is true, but the point is that even the folks who invented the
language don't have a problem with making the initialization explicit.
I'm not even trying to argue that folks should do it one way or the
other, I'm just saying it is unimportant, so let's drop it from
checkpatch.pl and save ourselves a lot of pointless code churn.
btw, see pg 94 of "The Practice of Programming" where the masters also
explicitly initialize statics.
prev parent reply other threads:[~2008-08-14 8:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 10:39 John Kacur
2008-08-13 11:50 ` John Kacur
2008-08-13 12:15 ` Arnd Bergmann
2008-08-13 20:19 ` Guennadi Liakhovetski
2008-08-14 8:42 ` John Kacur [this message]
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=520f0cf10808140142m387f59faka4287aef7d18a7ae@mail.gmail.com \
--to=jkacur@gmail.com \
--cc=apw@shadowen.org \
--cc=arnd@arndb.de \
--cc=g.liakhovetski@gmx.de \
--cc=jschopp@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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
all inboxes | Powered by JetHome®