]> Git Repo - qemu.git/commit
block/vpc: fix uninitialised variable compiler warning
authorMark Cave-Ayland <[email protected]>
Fri, 21 Jul 2017 08:21:05 +0000 (09:21 +0100)
committerPeter Maydell <[email protected]>
Fri, 21 Jul 2017 14:00:07 +0000 (15:00 +0100)
commitc8115f8eb8b6c4742e5e0c0c644904cd81ed65fa
tree93549e05684d318f3b08335f4bff7f566a55ffab
parentff9b5475021d230eef39ec15af56c603eec1b82f
block/vpc: fix uninitialised variable compiler warning

Since commit cfc87e00 "block/vpc.c: Handle write failures in
get_image_offset()" older versions of gcc (in this case 4.7) incorrectly
warn that "ret" can be used uninitialised in vpc_co_pwritev().

Setting ret to 0 at the start of vpc_co_pwritev() prevents the warning
in gcc 4.7 and enables compilation with -Werror to succeed.

Signed-off-by: Mark Cave-Ayland <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Message-id: 1500625265[email protected]
Signed-off-by: Peter Maydell <[email protected]>
block/vpc.c
This page took 0.025197 seconds and 4 git commands to generate.