[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block/vpc: fix uninitialised variable compiler
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] block/vpc: fix uninitialised variable compiler warning |
Date: |
Fri, 21 Jul 2017 13:13:28 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Fri, Jul 21, 2017 at 09:21:05AM +0100, Mark Cave-Ayland wrote:
> 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 <address@hidden>
> ---
> block/vpc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature