All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-progs: image: fix compiler warning
Date: Wed, 05 Oct 2016 17:07:48 +0900	[thread overview]
Message-ID: <201610050807.AA00000@WIN-5MHF4RKU941.jp.fujitsu.com> (raw)

In v4.8-rc1, gcc 5.3.1 gives following warning. Fixed it.

    [CC]     btrfs-image.o
btrfs-image.c: In function 'flush_pending':
btrfs-image.c:708:17: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
  header->bytenr = cpu_to_le64(start);
                 ^
btrfs-image.c:927:6: note: 'start' was declared here
  u64 start;
      ^

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
---
 btrfs-image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/btrfs-image.c b/btrfs-image.c
index 0d410f8..47f36b9 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -924,7 +924,7 @@ static int flush_pending(struct metadump_struct *md, int done)
 	struct async_work *async = NULL;
 	struct extent_buffer *eb;
 	u64 blocksize = md->root->nodesize;
-	u64 start;
+	u64 start = 0;
 	u64 size;
 	size_t offset;
 	int ret = 0;
-- 
2.9.3

----
Tsutomu Itoh  t-itoh@jp.fujitsu.com

             reply	other threads:[~2016-10-05  8:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05  8:07 Tsutomu Itoh [this message]
2016-10-06 16:00 ` [PATCH] btrfs-progs: image: fix compiler warning David Sterba
2016-10-07  2:40   ` Tsutomu Itoh

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=201610050807.AA00000@WIN-5MHF4RKU941.jp.fujitsu.com \
    --to=t-itoh@jp.fujitsu.com \
    --cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.