[PATCH] staging: comedi: serial2002: quiet NULL pointer sparse noise

Dan Carpenter dan.carpenter at oracle.com
Fri Jun 8 09:48:42 UTC 2012

On Fri, Jun 08, 2012 at 10:07:30AM +0100, Ian Abbott wrote:
> I wonder if it also issues that warning for a struct initializer such as
> {0} where the first member of the struct is a pointer, or would it
> expect you to use {NULL} which is more confusing when the struct
> contains a mixture of pointer and non-pointer members?

It does warn about that.  The fix is to just say:

	struct foo bar = {};

dan carpenter

More information about the devel mailing list