lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 21 Dec 2006 16:57:19 -0800 (PST)
From:	David Rientjes <rientjes@...washington.edu>
To:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
cc:	Joe Perches <joe@...ches.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	akpm@...l.org
Subject: Re: my handy-dandy, "coding style" script

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ