Commit 921476f0 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Kleber Sacilotto de Souza

jfs: fix bogus variable self-initialization

BugLink: https://bugs.launchpad.net/bugs/1864773

[ Upstream commit a5fdd713 ]

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: c9e3ad60 ("JFS: Get rid of "may be used uninitialized" warnings")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 47fc0c31
...@@ -1928,8 +1928,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -1928,8 +1928,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
* header ? * header ?
*/ */
if (tlck->type & tlckTRUNCATE) { if (tlck->type & tlckTRUNCATE) {
/* This odd declaration suppresses a bogus gcc warning */ pxd_t pxd; /* truncated extent of xad */
pxd_t pxd = pxd; /* truncated extent of xad */
int twm; int twm;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment