mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix compilation warning for fs/ocfs2/xattr.c
@ 2009-07-13 19:49 Subrata Modak
  2009-07-21  0:28 ` Joel Becker
  0 siblings, 1 reply; 2+ messages in thread
From: Subrata Modak @ 2009-07-13 19:49 UTC (permalink / raw)
  To: ocfs2-devel, Mark Fasheh, Joel Becker
  Cc: Sachin P Sant, David Howells, Subrata Modak, Balbir Singh, LKML

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

Hi,

gcc 4.4.1 generates the following build warning on i386:

CC [M]  fs/ocfs2/xattr.o
fs/ocfs2/xattr.c: In function ‘ocfs2_xattr_block_get’:
fs/ocfs2/xattr.c:1055: warning: ‘block_off’ may be used uninitialized in this function

The following fix is based on a similar approach by David Howells
few days back: http://lkml.org/lkml/2009/7/9/109,

Signed-off-by: Subrata Modak<subrata@linux.vnet.ibm.com>,
---

--- a/fs/ocfs2/xattr.c	2009-06-17 17:47:21.000000000 +0530
+++ b/fs/ocfs2/xattr.c	2009-07-14 01:02:22.000000000 +0530
@@ -1052,7 +1052,8 @@ static int ocfs2_xattr_block_get(struct 
 	struct ocfs2_xattr_block *xb;
 	struct ocfs2_xattr_value_root *xv;
 	size_t size;
-	int ret = -ENODATA, name_offset, name_len, block_off, i;
+	int ret = -ENODATA, name_offset, name_len, i;
+	int uninitialized_var(block_off);
 
 	xs->bucket = ocfs2_xattr_bucket_new(inode);
 	if (!xs->bucket) {

---
Regards--
Subrata


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-21  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-13 19:49 [PATCH] Fix compilation warning for fs/ocfs2/xattr.c Subrata Modak
2009-07-21  0:28 ` Joel Becker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®