public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	Alexandre Pereira da Silva <aletes.xgr@gmail.com>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: [PATCH] ubifs: Fix build warning
Date: Mon, 25 Jun 2012 12:19:40 -0300	[thread overview]
Message-ID: <1340637580-12711-1-git-send-email-aletes.xgr@gmail.com> (raw)

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

Initilize saved_nlink to 0

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
---
 fs/ubifs/dir.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index a6d42ef..d5b8cb1e 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -969,7 +969,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 saved_nlink = 0;
 
 	/*
 	 * Budget request settings: deletion direntry, new direntry, removing
-- 
1.7.10

             reply	other threads:[~2012-06-25 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 15:19 Alexandre Pereira da Silva [this message]
2012-06-25 16:15 ` [PATCH] ubifs: Fix build warning Randy Dunlap
2012-06-25 18:23   ` Alexandre Pereira da Silva

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=1340637580-12711-1-git-send-email-aletes.xgr@gmail.com \
    --to=aletes.xgr@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox