kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] Squashfs: silence some uninitialized variable warnings
@ 2016-07-13 10:02 Dan Carpenter
  2016-07-13 11:29 ` Silvan Jegen
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2016-07-13 10:02 UTC (permalink / raw)
  To: Phillip Lougher; +Cc: linux-kernel, kernel-janitors

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);
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-13 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 10:02 [patch] Squashfs: silence some uninitialized variable warnings Dan Carpenter
2016-07-13 11:29 ` Silvan Jegen
2016-07-13 11:36   ` Dan Carpenter

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).