kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Phillip Lougher <phillip@squashfs.org.uk>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] Squashfs: silence some uninitialized variable warnings
Date: Wed, 13 Jul 2016 10:02:49 +0000	[thread overview]
Message-ID: <20160713100249.GB29468@mwanda> (raw)

We print these values in the TRACE() code before we check that
fill_meta_index() was successful.  It makes my static checker complain.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/squashfs/file.c b/fs/squashfs/file.c
index 13d8094..46679e2 100644
--- a/fs/squashfs/file.c
+++ b/fs/squashfs/file.c
@@ -334,9 +334,9 @@ failed:
  */
 static int read_blocklist(struct inode *inode, int index, u64 *block)
 {
-	u64 start;
+	u64 start = -1;
 	long long blks;
-	int offset;
+	int offset = -1;
 	__le32 size;
 	int res = fill_meta_index(inode, index, &start, &offset, block);
 

             reply	other threads:[~2016-07-13 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 10:02 Dan Carpenter [this message]
2016-07-13 11:29 ` [patch] Squashfs: silence some uninitialized variable warnings Silvan Jegen
2016-07-13 11:36   ` Dan Carpenter

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=20160713100249.GB29468@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillip@squashfs.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).