]> git.proxmox.com Git - qemu.git/commit
block: Fix compiler warning (-Werror=uninitialized)
authorStefan Weil <sw@weilnetz.de>
Sun, 22 Sep 2013 06:19:10 +0000 (08:19 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 25 Sep 2013 14:21:28 +0000 (16:21 +0200)
commitc3e4f43a99549daa6e9b87350922e8339341c2ab
treed13985f21f5cdd6c1c783e953f4beb08e53415a6
parent030be32184034261da14693b69e9582f6fe4af9d
block: Fix compiler warning (-Werror=uninitialized)

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 <sw@weilnetz.de>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/stream.c