Re: ERROR: do not initialise externals to 0 or NULL

Dan Carpenter
2010-07-05T19:36:52Z

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