diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2013-04-23 01:23:04 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-04-26 20:18:24 +0200 |
commit | dc03640b5851d3115448493f0eee2b7f539de81a (patch) | |
tree | d89b031b04e79e5b53be6e89de64b7bd6b59d2d3 /pc-bios/s390-ccw | |
parent | 6328801f19b08302377e812c454fd2b837f669e3 (diff) | |
download | qemu-dc03640b5851d3115448493f0eee2b7f539de81a.zip qemu-dc03640b5851d3115448493f0eee2b7f539de81a.tar.gz qemu-dc03640b5851d3115448493f0eee2b7f539de81a.tar.bz2 |
s390-ccw.img: Fix compile warning in s390 ccw virtio code
Lets fix this gcc warning:
virtio.c: In function ‘vring_send_buf’:
virtio.c:125:35: error: operation on ‘vr->next_idx’ may be undefined
[-Werror=sequence-point]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'pc-bios/s390-ccw')
-rw-r--r-- | pc-bios/s390-ccw/virtio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c index 79e2941..1968fc6 100644 --- a/pc-bios/s390-ccw/virtio.c +++ b/pc-bios/s390-ccw/virtio.c @@ -122,7 +122,9 @@ static void vring_send_buf(struct vring *vr, void *p, int len, int flags) vr->desc[vr->next_idx].addr = (ulong)p; vr->desc[vr->next_idx].len = len; vr->desc[vr->next_idx].flags = flags & ~VRING_HIDDEN_IS_CHAIN; - vr->desc[vr->next_idx].next = ++vr->next_idx; + vr->desc[vr->next_idx].next = vr->next_idx; + vr->desc[vr->next_idx].next++; + vr->next_idx++; /* Chains only have a single ID */ if (!(flags & VRING_DESC_F_NEXT)) { |