Re: [PATCH] btrfs-progs: image: fix compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 05, 2016 at 05:07:48PM +0900, Tsutomu Itoh wrote:
> 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;
>       ^

So the patch makes the compiler warning go away, but is the code
correct? AFAICS, the warning points to the case where flush_pending is
called with done=1 (from create_metadump) and there's zero
md->pending_size . Are you sure this is an expected state and that the
function can proceed with state = 0 ?
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux