summaryrefslogtreecommitdiff
path: root/fs/jfs
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-03-22 17:19:16 +0300
committerDave Kleikamp <dave.kleikamp@oracle.com>2019-03-22 17:38:37 +0300
commita5fdd713d256887b5f012608701149fa939e5645 (patch)
treef5b63f33fa5f4ecea1a93c7014f6c78c90474c95 /fs/jfs
parent2e3bc6125154c691e987e2554f2c99ec10f83b73 (diff)
downloadlinux-a5fdd713d256887b5f012608701149fa939e5645.tar.xz
jfs: fix bogus variable self-initialization
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: c9e3ad6021e5 ("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>
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/jfs_txnmgr.c3
1 files changed, 1 insertions, 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;
/*