[PATCH] AFS: Fix compilation warning
David Howells
dhowells at redhat.com
Thu Jul 9 05:44:30 EDT 2009
From: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Fix the following warning:
fs/afs/dir.c: In function 'afs_d_revalidate':
fs/afs/dir.c:567: warning: 'fid.vnode' may be used uninitialized in this function
fs/afs/dir.c:567: warning: 'fid.unique' may be used uninitialized in this function
by marking the 'fid' variable as an uninitialized_var. The problem is that gcc
doesn't always manage to work out that fid is always set on the path through
the function that uses it.
Cc: linux-afs at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Howells <dhowells at redhat.com>
---
fs/afs/dir.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index 5272872..790ba9d 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -566,7 +566,7 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
static int afs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
{
struct afs_vnode *vnode, *dir;
- struct afs_fid fid;
+ struct afs_fid uninitialized_var(fid);
struct dentry *parent;
struct key *key;
void *dir_version;
More information about the linux-afs
mailing list