From f30d44f3e54a94e037da7a71d714b585dab28d9e Mon Sep 17 00:00:00 2001 From: Poyo VL Date: Mon, 11 Oct 2010 13:45:52 -0700 Subject: [PATCH] =?utf8?q?When=20I=20tried=20to=20compile=20I=20got=20the?= =?utf8?q?=20following=20warning:=20fs/ocfs2/slot=5Fmap.c:=20In=20function?= =?utf8?q?=20=E2=80=98ocfs2=5Finit=5Fslot=5Finfo=E2=80=99:=20fs/ocfs2/slot?= =?utf8?q?=5Fmap.c:360:=20warning:=20=E2=80=98bytes=E2=80=99=20may=20be=20?= =?utf8?q?used=20uninitialized=20in=20this=20function=20fs/ocfs2/slot=5Fma?= =?utf8?q?p.c:360:=20note:=20=E2=80=98bytes=E2=80=99=20was=20declared=20he?= =?utf8?q?re=20Compiler:=20gcc=20version=204.4.3=20(GCC)=20on=20Mandriva?= =?utf8?q?=20I'm=20not=20sure=20why=20this=20warning=20occurs,=20I=20think?= =?utf8?q?=20compiler=20don't=20know=20that=20variable=20"bytes"=20is=20in?= =?utf8?q?itialized=20when=20it=20is=20sent=20by=20reference=20to=20ocfs2?= =?utf8?q?=5Fslot=5Fmap=5Fphysical=5Fsize=20and=20it=20throws=20that=20ugl?= =?utf8?q?y=20warning.=20However,=20a=20simple=20initialization=20of=20"by?= =?utf8?q?tes"=20variable=20with=200=20will=20fix=20it.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Ionut Gabriel Popescu Signed-off-by: Joel Becker --- fs/ocfs2/slot_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2