Skip to contentSkip to conversation

qemu-xen: fix compiler warning in load_linux

PATCH New Olaf Hering 1 participant 1 message Nov 2, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-xen: fix compiler warning in load_linux

fix compile warning.

/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/ioemu-dir/hw/pc.c: In function 'load_linux':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/ioemu-dir/hw/pc.c:713:39: warning: operation on 'seg[4]' may be undefined

---
 ioemu-remote/hw/pc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ioemu-remote/hw/pc.c +1 -1
@@ -714,7 +714,7 @@ static void load_linux(uint8_t *option_r
 
     /* generate bootsector to set up the initial register state */
     real_seg = real_addr >> 4;
-    seg[0] = seg[2] = seg[3] = seg[4] = seg[4] = real_seg;
+    seg[0] = seg[2] = seg[3] = seg[4] = real_seg;
     seg[1] = real_seg+0x20;	/* CS */
     memset(gpr, 0, sizeof gpr);
     gpr[4] = cmdline_addr-real_addr-16;	/* SP (-16 is paranoia) */