From: Artem Bityutskiy <dedekind1@gmail.com>
To: linux-mtd@lists.infradead.org
Subject: [PATCH 2/2] mkfs.ubifs: fix a gcc warning
Date: Mon, 4 Jul 2011 09:59:05 +0300 [thread overview]
Message-ID: <1309762745-20175-2-git-send-email-dedekind1@gmail.com> (raw)
In-Reply-To: <1309762745-20175-1-git-send-email-dedekind1@gmail.com>
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 <dedekind1@gmail.com>
---
mkfs.ubifs/mkfs.ubifs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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);
--
1.7.5.4
prev parent reply other threads:[~2011-07-04 6:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-04 6:59 [PATCH 1/2] mkfs.ubifs: remove root inode squash feature Artem Bityutskiy
2011-07-04 6:59 ` Artem Bityutskiy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1309762745-20175-2-git-send-email-dedekind1@gmail.com \
--to=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.