mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
jfs: fix bogus variable self-initialization
[ Upstream commita5fdd713d2
] 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. Fixes:c9e3ad6021
("JFS: Get rid of "may be used uninitialized" warnings") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b6e63c1862
commit
b754f2894e
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue