Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1945898AbWLVBXR (ORCPT ); Thu, 21 Dec 2006 20:23:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1945899AbWLVBXR (ORCPT ); Thu, 21 Dec 2006 20:23:17 -0500 Received: from mx4.cs.washington.edu ([128.208.4.190]:44762 "EHLO mx4.cs.washington.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1945898AbWLVBXR (ORCPT ); Thu, 21 Dec 2006 20:23:17 -0500 X-Greylist: delayed 1541 seconds by postgrey-1.27 at vger.kernel.org; Thu, 21 Dec 2006 20:23:17 EST Date: Thu, 21 Dec 2006 16:57:19 -0800 (PST) From: David Rientjes To: Jan Engelhardt cc: Joe Perches , Linux Kernel Mailing List , akpm@osdl.org Subject: Re: my handy-dandy, "coding style" script In-Reply-To: Message-ID: References: <20061219164146.GI25461@redhat.com> <4589BC6E.7040209@tmr.com> <1166741599.27218.7.camel@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 791 Lines: 20 On Fri, 22 Dec 2006, Jan Engelhardt wrote: > >These casts can eliminate "return value unused" warnings. > > But only when functions are tagged __must_check, and sprintf is not. > cmpxchg is one where (void) is 'needed', __as I wrote__ in a cxgb3 > comment. > gcc requires functions to be declared with the attribute warn_unused_result if a warning should be emitted in these cases. So casting sprintf or any function without warn_unused_result to (void) is only visual noise within the source code. Thus, the patch is correct. David - 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/