From patchwork Mon Jun 25 20:47:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Pereira da Silva X-Patchwork-Id: 167241 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (unknown [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 15725B6FAA for ; Tue, 26 Jun 2012 06:49:23 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SjGCS-0008De-4v; Mon, 25 Jun 2012 20:47:56 +0000 Received: from mail-yx0-f177.google.com ([209.85.213.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SjGCO-0008DQ-Gn for linux-mtd@lists.infradead.org; Mon, 25 Jun 2012 20:47:53 +0000 Received: by yenr9 with SMTP id r9so3489546yen.36 for ; Mon, 25 Jun 2012 13:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=tE1lWoIPTv35pMbG1dHohq+HfrnUV/SJbXcuAp7Layk=; b=oVm+QDz4bbN8HoVeH0Y6lSOCMLQ3ByIHv0o4XQVdLgrdDyJ7RVAqIUFvXxZOk3WFWh B++NmBdTeXalzhOPRn95S62ZvfnYEggygATFF/M8HMdQCDtpCssQwB9TuBy84NAco7wo laVPltLQufLGKnFp1aC3t03ZitYDzvq7t1KzqJ9qp+rtir+M5k6UpVqS9VNW+qCQVR4M aeglh7xDDucCsuY3mJEny52IEPt/IyWKAqCQLVyye9qi/I5jDM8ft5VKke/RuCC8BeY3 6ATh4grQhOFfEPEqqwivYMGY1rLyzJBRZhs9mbokP037Q+BQk7lM1E2L9zgzAoZOx8v1 DW2Q== Received: by 10.236.187.37 with SMTP id x25mr14860834yhm.48.1340657269945; Mon, 25 Jun 2012 13:47:49 -0700 (PDT) Received: from localhost.localdomain (c934e2ab.virtua.com.br. [201.52.226.171]) by mx.google.com with ESMTPS id e5sm58200690ani.18.2012.06.25.13.47.47 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jun 2012 13:47:48 -0700 (PDT) From: Alexandre Pereira da Silva To: Subject: [PATCH v2] ubifs: Fix build warning Date: Mon, 25 Jun 2012 17:47:49 -0300 Message-Id: <1340657269-8588-1-git-send-email-aletes.xgr@gmail.com> X-Mailer: git-send-email 1.7.10 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (aletes.xgr[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Adrian Hunter , Alexandre Pereira da Silva , Artem Bityutskiy X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Fix: fs/ubifs/dir.c: In function 'ubifs_rename': fs/ubifs/dir.c:972:15: warning: 'saved_nlink' may be used uninitialized in this function Use gcc uninitialized_var macro to avoid bogus warning Signed-off-by: Alexandre Pereira da Silva --- Applies to v3.5-rc4 Changes since v1: Use uninitialized_var macro fs/ubifs/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index a6d42ef..40c2d04 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -41,6 +41,7 @@ */ #include "ubifs.h" +#include /** * inherit_flags - inherit flags of the parent inode. @@ -969,7 +970,7 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry, struct ubifs_budget_req ino_req = { .dirtied_ino = 1, .dirtied_ino_d = ALIGN(old_inode_ui->data_len, 8) }; struct timespec time; - unsigned int saved_nlink; + unsigned int uninitialized_var(saved_nlink); /* * Budget request settings: deletion direntry, new direntry, removing