qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Build failure on git master


From: Mark Cave-Ayland
Subject: Re: [Qemu-devel] Build failure on git master
Date: Thu, 20 Jul 2017 20:29:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 19/07/17 18:09, Mark Cave-Ayland wrote:

> Hi all,
> 
> I see the following build failure here on git master with gcc 4.7.2:
> 
> cc -I/home/build/src/qemu/git/qemu/block -Iblock
> -I/home/build/src/qemu/git/qemu/tcg
> -I/home/build/src/qemu/git/qemu/tcg/i386
> -I/home/build/src/qemu/git/qemu/linux-headers
> -I/home/build/src/qemu/git/qemu/linux-headers -I.
> -I/home/build/src/qemu/git/qemu
> -I/home/build/src/qemu/git/qemu/accel/tcg
> -I/home/build/src/qemu/git/qemu/include -I/usr/include/pixman-1
> -I/home/build/src/qemu/git/qemu/dtc/libfdt -Werror -pthread
> -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
> -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
> -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv
> -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs
> -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
> -Wold-style-declaration -Wold-style-definition -Wtype-limits
> -fstack-protector-all -I/usr/include/p11-kit-1
> -I/usr/include/libpng12   -I/home/build/src/qemu/git/qemu/tests -MMD -MP
> -MT block/vpc.o -MF block/vpc.d -O2 -U_FORTIFY_SOURCE
> -D_FORTIFY_SOURCE=2 -g   -c -o block/vpc.o block/vpc.c
> block/vpc.c: In function ‘vpc_co_pwritev’:
> block/vpc.c:652:9: error: ‘ret’ may be used uninitialized in this
> function [-Werror=maybe-uninitialized]
> cc1: all warnings being treated as errors
> make: *** [block/vpc.o] Error 1
> 
> At a quick glance it looks as if this is being caused by commit cfc87e00
> "block/vpc.c: Handle write failures in get_image_offset()".

The fix is seemingly quite simple:

diff --git a/block/vpc.c b/block/vpc.c
index 10e6519..574879b 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -649,7 +649,7 @@ vpc_co_pwritev(BlockDriverState *bs, uint64_t
offset, uint64_t bytes,
     int64_t image_offset;
     int64_t n_bytes;
     int64_t bytes_done = 0;
-    int ret;
+    int ret = 0;
     VHDFooter *footer =  (VHDFooter *) s->footer_buf;
     QEMUIOVector local_qiov;


ATB,

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]