From 0feba3a086a5c500e743a162b0f7cd8234afe2d5 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 4 Jul 2011 09:53:04 +0300 Subject: mkfs.ubifs: fix a gcc warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch "fixes" the following gcc warning: mkfs.ubifs/mkfs.ubifs.c: In function ‘main’: mkfs.ubifs/ubifs.h:420:2: warning: ‘child_cnt’ may be used uninitialized in this function [-Wuninitialized] mkfs.ubifs/mkfs.ubifs.c:1735:6: note: ‘child_cnt’ was declared here by initializing the ‘child_cnt’ to zero. Signed-off-by: Artem Bityutskiy --- mkfs.ubifs/mkfs.ubifs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c index 79cc71d..dcdb722 100644 --- a/mkfs.ubifs/mkfs.ubifs.c +++ b/mkfs.ubifs/mkfs.ubifs.c @@ -1732,7 +1732,7 @@ static int write_index(void) struct idx_entry **idx_ptr, **p; struct ubifs_idx_node *idx; struct ubifs_branch *br; - int child_cnt, j, level, blnum, boffs, blen, blast_len, err; + int child_cnt = 0, j, level, blnum, boffs, blen, blast_len, err; dbg_msg(1, "leaf node count: %zd", idx_cnt); -- cgit v1.2.3