aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fscache
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-12-15 19:47:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:20:13 -0500
commitea58ceb543b45d45b257a86eaf9d60c94e8adcf2 (patch)
treed2c44790f9a79e4d1eab26ff02b6880ab7966120 /fs/fscache
parent06a7f711246b081afc21fff859f1003f1f2a0fbc (diff)
FS-Cache: Avoid maybe-used-uninitialised warning on variable
Andrew Morton's compiler sees the following warning in FS-Cache: fs/fscache/object-list.c: In function 'fscache_objlist_lookup': fs/fscache/object-list.c:94: warning: 'obj' may be used uninitialized in this function which my compiler doesn't. This is a false positive as obj can only be used in the comparison against minobj if minobj has been set to something other than NULL, but for that to happen, obj has to be first set to something. Deal with this by preclearing obj too. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fscache')
-rw-r--r--fs/fscache/object-list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fscache/object-list.c b/fs/fscache/object-list.c
index e590242fa41a..3221a0c7944e 100644
--- a/fs/fscache/object-list.c
+++ b/fs/fscache/object-list.c
@@ -91,7 +91,7 @@ EXPORT_SYMBOL(fscache_object_destroy);
91 */ 91 */
92static struct fscache_object *fscache_objlist_lookup(loff_t *_pos) 92static struct fscache_object *fscache_objlist_lookup(loff_t *_pos)
93{ 93{
94 struct fscache_object *pobj, *obj, *minobj = NULL; 94 struct fscache_object *pobj, *obj = NULL, *minobj = NULL;
95 struct rb_node *p; 95 struct rb_node *p;
96 unsigned long pos; 96 unsigned long pos;
97 97