public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Evgeniy Dushistov <dushistov@mail.ru>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] ufs: silence uninitialized warnings
Date: Tue, 22 Mar 2016 14:40:02 +0300	[thread overview]
Message-ID: <20160322114001.GB4519@mwanda> (raw)

Static checkers complain that we can use "tmp" without initializing it.

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

diff --git a/fs/ufs/util.h b/fs/ufs/util.h
index 9541759..8aa8812 100644
--- a/fs/ufs/util.h
+++ b/fs/ufs/util.h
@@ -88,7 +88,7 @@ ufs_get_fs_npsect(struct super_block *sb, struct ufs_super_block_first *usb1,
 static inline u64
 ufs_get_fs_qbmask(struct super_block *sb, struct ufs_super_block_third *usb3)
 {
-	__fs64 tmp;
+	__fs64 tmp = 0;
 
 	switch (UFS_SB(sb)->s_flags & UFS_ST_MASK) {
 	case UFS_ST_SUNOS:
@@ -112,7 +112,7 @@ ufs_get_fs_qbmask(struct super_block *sb, struct ufs_super_block_third *usb3)
 static inline u64
 ufs_get_fs_qfmask(struct super_block *sb, struct ufs_super_block_third *usb3)
 {
-	__fs64 tmp;
+	__fs64 tmp = 0;
 
 	switch (UFS_SB(sb)->s_flags & UFS_ST_MASK) {
 	case UFS_ST_SUNOS:

             reply	other threads:[~2016-03-22 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 11:40 Dan Carpenter [this message]
2016-03-22 13:41 ` [patch] ufs: silence uninitialized warnings Evgeniy Dushistov

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=20160322114001.GB4519@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=dushistov@mail.ru \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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