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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 22 Mar 2019 09:41:21 -0500
From:   Dave Kleikamp <dave.kleikamp@...cle.com>
To:     Arnd Bergmann <arnd@...db.de>, Dave Kleikamp <shaggy@...nel.org>
Cc:     clang-built-linux@...glegroups.com,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nathan Chancellor <natechancellor@...il.com>,
        jfs-discussion@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] jfs: fix bogus variable self-initialization

On 3/22/19 9:19 AM, Arnd Bergmann wrote:
> A statement was originally added in 2006 to shut up a gcc warning,
> now but now clang warns about it:
> 
> fs/jfs/jfs_txnmgr.c:1932:15: error: variable 'pxd' is uninitialized when used within its own initialization
>       [-Werror,-Wuninitialized]
>                 pxd_t pxd = pxd;        /* truncated extent of xad */
>                       ~~~   ^~~
> 
> Modern versions of gcc are fine without the silly assignment, so just
> drop it. Tested with gcc-4.6 (released 2011), 4.7, 4.8, and 4.9.

Thanks Arnd. Will push it upstream.

Shaggy

> 
> Fixes: c9e3ad6021e5 ("JFS: Get rid of "may be used uninitialized" warnings")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Dave Kleikamp <dave.kleikamp@...cle.com>

> ---
>  fs/jfs/jfs_txnmgr.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
> index a5663cb621d8..78789c5ed36b 100644
> --- a/fs/jfs/jfs_txnmgr.c
> +++ b/fs/jfs/jfs_txnmgr.c
> @@ -1928,8 +1928,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
>  	 * header ?
>  	 */
>  	if (tlck->type & tlckTRUNCATE) {
> -		/* This odd declaration suppresses a bogus gcc warning */
> -		pxd_t pxd = pxd;	/* truncated extent of xad */
> +		pxd_t pxd;	/* truncated extent of xad */
>  		int twm;
>  
>  		/*
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ