]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
jfs: fix bogus variable self-initialization
authorArnd Bergmann <arnd@arndb.de>
Fri, 22 Mar 2019 14:19:16 +0000 (15:19 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commitd546e79510f4ee63ef17d93283692c2f1ebcb5a2
tree9ea88054e6634fd9fb42a3e76f74729d1dc53898
parenteb1714120d9526df55f39e9080cf61a275684c0f
jfs: fix bogus variable self-initialization

BugLink: https://bugs.launchpad.net/bugs/1863019
[ 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: 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/jfs/jfs_txnmgr.c