Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934243Ab2FHJtP (ORCPT ); Fri, 8 Jun 2012 05:49:15 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:42987 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932665Ab2FHJtG (ORCPT ); Fri, 8 Jun 2012 05:49:06 -0400 Date: Fri, 8 Jun 2012 12:48:42 +0300 From: Dan Carpenter To: Ian Abbott Cc: "devel@driverdev.osuosl.org" , "fmhess@users.sourceforge.net" , Ian Abbott , "gregkh@linuxfoundation.org" , Linux Kernel , H Hartley Sweeten Subject: Re: [PATCH] staging: comedi: serial2002: quiet NULL pointer sparse noise Message-ID: <20120608094842.GM4400@mwanda> References: <201206071714.25934.hartleys@visionengravers.com> <4FD19FBB.4040507@mev.co.uk> <20120608065125.GL4400@mwanda> <4FD1C0D2.8060704@mev.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FD1C0D2.8060704@mev.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 674 Lines: 18 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 = {}; regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/