hw/virtio-serial-bus.c: 725 static int virtser_port_qdev_init(DeviceState *qdev, DeviceInfo *base) 726 { ... 730 int ret, max_nr_ports; ... 762 max_nr_ports = tswap32(port->vser->config.max_nr_ports); 763 if (port->id >= max_nr_ports) { tswap32() returns an uint32_t variable. Signed-off-by: Amos Kong <akong@xxxxxxxxxx> --- hw/virtio-serial-bus.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 9a12104..aae8456 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -727,7 +727,8 @@ static int virtser_port_qdev_init(DeviceState *qdev, DeviceInfo *base) VirtIOSerialPort *port = DO_UPCAST(VirtIOSerialPort, dev, qdev); VirtIOSerialPortInfo *info = DO_UPCAST(VirtIOSerialPortInfo, qdev, base); VirtIOSerialBus *bus = DO_UPCAST(VirtIOSerialBus, qbus, qdev->parent_bus); - int ret, max_nr_ports; + int ret; + uint32_t max_nr_ports; bool plugging_port0; port->vser = bus->vser; -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html