From patchwork Mon Jul 4 06:59:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 103041 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AFB07B6F6C for ; Mon, 4 Jul 2011 16:58:35 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qdd6n-0008OK-Q9; Mon, 04 Jul 2011 06:58:18 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qdd6n-0001QC-DR; Mon, 04 Jul 2011 06:58:17 +0000 Received: from mga03.intel.com ([143.182.124.21]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qdd6e-0001OH-FF for linux-mtd@lists.infradead.org; Mon, 04 Jul 2011 06:58:09 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 03 Jul 2011 23:58:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,471,1304319600"; d="scan'208";a="22342860" Received: from unknown (HELO sauron.amr.corp.intel.com) ([10.255.13.150]) by azsmga001.ch.intel.com with ESMTP; 03 Jul 2011 23:58:04 -0700 From: Artem Bityutskiy 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 Message-Id: <1309762745-20175-2-git-send-email-dedekind1@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1309762745-20175-1-git-send-email-dedekind1@gmail.com> References: <1309762745-20175-1-git-send-email-dedekind1@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110704_025808_655268_DB2FEF58 X-CRM114-Status: GOOD ( 12.01 ) X-Spam-Score: -1.0 (-) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [143.182.124.21 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dedekind1[at]gmail.com) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (dedekind1[at]gmail.com) 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 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);