From: Tsutomu Itoh Date: Wed, 5 Oct 2016 08:07:48 +0000 (+0900) Subject: btrfs-progs: image: fix compiler warning X-Git-Tag: upstream/4.16.1~1187 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9ec835ae1448e9f6fe5e9bbe29c94b6d8cee4ee;p=platform%2Fupstream%2Fbtrfs-progs.git btrfs-progs: image: fix compiler warning 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 Signed-off-by: David Sterba --- diff --git a/btrfs-image.c b/btrfs-image.c index 8781b9e..0b915c6 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;