On Wed, Jul 06, 2016 at 08:20:40AM +0200, Igor Mammedov wrote: > + error_setg(errp, "CPU[%ld] with APIC ID %" PRIu32 " exists", > + cpu_slot - pcms->possible_cpus->cpus, > + cpu->apic_id);
Build error on 32-bit reported by Peter Maydell: /home/petmay01/qemu/hw/i386/pc.c: In function 'pc_cpu_pre_plug': /home/petmay01/qemu/hw/i386/pc.c:1926:9: error: format '%ld' expects argument of type 'long int', but argument 6 has type 'int' [-Werror=format=] error_setg(errp, "CPU[%ld] with APIC ID %" PRIu32 " exists", ^ cc1: all warnings being treated as errors I have fixed this on git, with: diff --git a/hw/i386/pc.c b/hw/i386/pc.c index cf518ac..ac7a4d5 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1923,9 +1923,8 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev, } if (cpu_slot->cpu) { - error_setg(errp, "CPU[%ld] with APIC ID %" PRIu32 " exists", - cpu_slot - pcms->possible_cpus->cpus, - cpu->apic_id); + error_setg(errp, "CPU[%d] with APIC ID %" PRIu32 " exists", + idx, cpu->apic_id); return; } -- Eduardo