[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH] block: Fix compiler warning (-Werror=uninitia
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-trivial] [PATCH] block: Fix compiler warning (-Werror=uninitialized) |
Date: |
Thu, 19 Sep 2013 16:44:34 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Sep 17, 2013 at 06:43:16PM +0200, Stefan Weil wrote:
> The patch fixes a warning from gcc (Debian 4.6.3-14+rpi1) 4.6.3:
>
> block/stream.c:141:22: error:
> ‘copy’ may be used uninitialized in this function [-Werror=uninitialized]
>
> This is not a real bug - a better compiler would not complain.
>
> Now 'copy' has always a defined value, so the check for ret >= 0
> can be removed.
>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
> block/stream.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan