Skip to contentSkip to conversation

GFS2: fix compilation warning about uninitialized var

PATCH New Steven Whitehouse 1 participant 1 message Mar 31, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 GFS2: fix compilation warning about uninitialized var

Hi,

Thanks for the patch, but it is already fixed in my -nmw tree,

Steve.

Quoted 25 lines · Bill Pemberton

fix the following warning:

fs/gfs2/inode.c:188:16: warning: ?inode? may be used uninitialized in this function

The warning is bogus as inode is not used in this function uninitialized.

---
 fs/gfs2/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/gfs2/inode.c +1 -1
index 97d54a2..b888099 100644
@@ -185,7 +185,7 @@ struct inode *gfs2_lookup_by_inum(struct gfs2_sbd *sdp, u64 no_addr,
 {
 	struct super_block *sb = sdp->sd_vfs;
 	struct gfs2_holder i_gh;
-	struct inode *inode;
+	struct inode *uninitialized_var(inode);
 	int error;
 
 	error = gfs2_glock_nq_num(sdp, no_addr, &gfs2_inode_glops,