Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit bacf3d2

Browse files
arndbgregkh
authored andcommitted
jfs: fix bogus variable self-initialization
[ Upstream commit a5fdd713d256887b5f012608701149fa939e5645 ] 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: c9e3ad6 ("JFS: Get rid of "may be used uninitialized" warnings") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Dave Kleikamp <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 0f2474e commit bacf3d2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/jfs/jfs_txnmgr.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1928,8 +1928,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
19281928
* header ?
19291929
*/
19301930
if (tlck->type & tlckTRUNCATE) {
1931-
/* This odd declaration suppresses a bogus gcc warning */
1932-
pxd_t pxd = pxd; /* truncated extent of xad */
1931+
pxd_t pxd; /* truncated extent of xad */
19331932
int twm;
19341933

19351934
/*

0 commit comments

Comments
 (0)