From dc03640b5851d3115448493f0eee2b7f539de81a Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Tue, 23 Apr 2013 01:23:04 +0000 Subject: s390-ccw.img: Fix compile warning in s390 ccw virtio code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Alexander Graf --- pc-bios/s390-ccw/virtio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pc-bios/s390-ccw') diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c index 79e2941618..1968fc6619 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)) { -- cgit v1.2.3