summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPoyo VL <poyo_vl@yahoo.com>2010-10-11 22:45:52 +0200
committerJoel Becker <joel.becker@oracle.com>2010-10-11 22:45:52 +0200
commitf30d44f3e54a94e037da7a71d714b585dab28d9e (patch)
treee86b1237a16d85661afcb4619d68d038c1dfdb1a
parentocfs2: validate bg_free_bits_count after update (diff)
downloadlinux-f30d44f3e54a94e037da7a71d714b585dab28d9e.tar.xz
linux-f30d44f3e54a94e037da7a71d714b585dab28d9e.zip
When I tried to compile I got the following warning:
fs/ocfs2/slot_map.c: In function ‘ocfs2_init_slot_info’: fs/ocfs2/slot_map.c:360: warning: ‘bytes’ may be used uninitialized in this function fs/ocfs2/slot_map.c:360: note: ‘bytes’ was declared here Compiler: gcc version 4.4.3 (GCC) on Mandriva I'm not sure why this warning occurs, I think compiler don't know that variable "bytes" is initialized when it is sent by reference to ocfs2_slot_map_physical_size and it throws that ugly warning. However, a simple initialization of "bytes" variable with 0 will fix it. Signed-off-by: Ionut Gabriel Popescu <poyo_vl@yahoo.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
-rw-r--r--fs/ocfs2/slot_map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c
index bfbd7e9e949f..ab4e0172cc1d 100644
--- a/fs/ocfs2/slot_map.c
+++ b/fs/ocfs2/slot_map.c
@@ -357,7 +357,7 @@ static int ocfs2_map_slot_buffers(struct ocfs2_super *osb,
{
int status = 0;
u64 blkno;
- unsigned long long blocks, bytes;
+ unsigned long long blocks, bytes = 0;
unsigned int i;
struct buffer_head *bh;