[PATCH 3/4] JFS: eliminate compiler warning
[email protected] (Dave Kleikamp) Wed, 20 Sep 2006 15:52:19 -0500 (CDT)
| Newsgroups | gmane.comp.file-systems.jfs.patches |
|---|---|
| Message-ID | <[email protected]> |
JFS: eliminate compiler warning gcc-4.1.1 complains in txCommit that pxd may be used unitialized. The usage is safe since the initialization and later use depend on the same condition. Initializing the data eliminates the warning and the overhead is minimal as this is not really a fast path. Patch suggested by Tony Breeds. Signed-off-by: Dave Kleikamp <[email protected]> --- commit 649dbaffea876b56839f35530976a3124c361f6b tree 23674ca513391537ea3679477a573d92e14a666a parent 2b46f77976f798f3fe800809a1d0ed38763c71c8 author Dave Kleikamp <[email protected]> Thu, 14 Sep 2006 09:34:02 -0500 committer Dave Kleikamp <[email protected]> Thu, 14 Sep 2006 09:34:02 -0500 fs/jfs/jfs_txnmgr.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index 17c67d7..58d0c26 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c @@ -1919,7 +1919,9 @@ static void xtLog(struct jfs_log * log, * header ? */ if (tlck->type & tlckTRUNCATE) { - pxd_t pxd; /* truncated extent of xad */ + pxd_t pxd = {0, 0, 0}; /* truncated extent of xad, + * zeroed to make gcc shut up + */ int twm; /* ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV