On 7 July 2017 at 18:07, Kevin Wolf <[email protected]> wrote:
> The following changes since commit b11365867568ba954de667a0bfe0945b8f78d6bd:
>
> Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170706' into
> staging (2017-07-06 11:42:59 +0100)
>
> are available in the git repository at:
>
>
> git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to 7d982302db173616d011e07ee43be3b0aae872b1:
>
> Merge remote-tracking branch 'mreitz/tags/pull-block-2017-07-07' into
> queue-block (2017-07-07 18:11:41 +0200)
>
> ----------------------------------------------------------------
>
> Block layer patches
>
Hi -- I'm afraid this doesn't build with clang:
CC block/qcow2-bitmap.o
/home/petmay01/linaro/qemu-for-merges/block/qcow2-bitmap.c:1183:9:
error: variable 'ret' is used uninitialized whenever 'if' condition is
true [-Werror,-Wsometimes-uninitialized]
if (tb_offset < 0) {
^~~~~~~~~~~~~
/home/petmay01/linaro/qemu-for-merges/block/qcow2-bitmap.c:1222:12:
note: uninitialized use occurs here
return ret;
^~~
/home/petmay01/linaro/qemu-for-merges/block/qcow2-bitmap.c:1183:5:
note: remove the 'if' if its condition is always false
if (tb_offset < 0) {
^~~~~~~~~~~~~~~~~~~~
/home/petmay01/linaro/qemu-for-merges/block/qcow2-bitmap.c:1165:12:
note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 error generated.
Looking at the code, the compiler appears to be correct
that that error-exit path has forgotten to set ret.
thanks
-- PMM