Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

AFS: Fix compilation warning

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@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Artem Bityutskiy and committed by
Linus Torvalds
dd0d9a46 405f5571

+1 -1
+1 -1
fs/afs/dir.c
··· 564 564 static int afs_d_revalidate(struct dentry *dentry, struct nameidata *nd) 565 565 { 566 566 struct afs_vnode *vnode, *dir; 567 - struct afs_fid fid; 567 + struct afs_fid uninitialized_var(fid); 568 568 struct dentry *parent; 569 569 struct key *key; 570 570 void *dir_version;