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:   Tue, 13 Aug 2019 16:14:20 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Colin King <colin.king@...onical.com>,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: sym53c8xx_2: remove redundant assignment to retv

On Fri, Aug 09, 2019 at 11:17:33AM -0700, Matthew Wilcox wrote:
> On Fri, Aug 09, 2019 at 06:59:32PM +0100, Colin King wrote:
> > Variable retv is initialized to a value that is never read and it
> > is re-assigned later. The initialization is redundant and can be
> > removed.
> 
> Acked-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> 
> Seems like a bit of a pointless class of warnings, given that gcc now
> initialises all locals.  But I'm happy for James or Martin to pick it up.

GCC doesn't initialize all locals.  Just some depending on the
optimization level.  It's related to a bug that's several years old.

This warning does find some bugs.  The common one is where people forget
to check the return.

	ret = something();
	// blank line here indicates that ret is never checked again.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ