public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Eloff <kagen101@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: ERROR: do not initialise externals to 0 or NULL
Date: Mon, 05 Jul 2010 20:19:29 +0000	[thread overview]
Message-ID: <1278361169.5396.32.camel@dermezel> (raw)
In-Reply-To: <1278346615.5396.3.camel@dermezel>

Hi Dan,

Here is the line of code:
/* Error variable.  Zero means no error. */
int dt3155_errno = 0;

no extern results in following error:
ERROR: do not initialise externals to 0 or NULL

It is declared in the globals scope at the top of the file just after
includes not in any function.

Have no idea why or how to make it go away??

Regards,

Joe

On Mon, 2010-07-05 at 21:36 +0200, Dan Carpenter wrote:
> On Mon, Jul 05, 2010 at 06:16:55PM +0200, Joe Eloff wrote:
> > Hi,
> > 
> > I have searched for results on this and most things I find is that it
> > must be dropped.
> > 
> 
> You mean something like:
> 
> extern int foo = 0;
> 
> initializing an extern doesn't make sense.  It doesn't matter what you
> initialize it to.  Gcc should warn about this.  The initialization should
> go where the actual variable is declared.
> 
> If that doesn't answer your question, can you send some sample code
> that causes the error?
> 
> regards,
> dan carpenter
> 
> > Could someone please give me an indication of ways to solve this or
> > should I just leave it in the patch?
> > 
> > Thanks,
> > 
> > Joe 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html



  parent reply	other threads:[~2010-07-05 20:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05 16:16 ERROR: do not initialise externals to 0 or NULL Joe Eloff
2010-07-05 19:36 ` Dan Carpenter
2010-07-05 20:03 ` Julia Lawall
2010-07-05 20:19 ` Joe Eloff [this message]
2010-07-05 20:45 ` Dan Carpenter
2010-07-05 20:48 ` Dan Carpenter
2010-07-05 20:53 ` Joe Eloff
2010-07-05 21:13 ` Joe Eloff
2010-07-05 21:17 ` Dan Carpenter
2010-07-05 21:21 ` Joe Eloff

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=1278361169.5396.32.camel@dermezel \
    --to=kagen101@gmail.com \
    --cc=kernel-janitors@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