Received: from eggs.gnu.org ([2001:4830:134:3::10]:40064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPtAw-0008Lv-Nj for qemu-devel@nongnu.org; Wed, 20 Jul 2016 11:12:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPtAr-000532-TQ for qemu-devel@nongnu.org; Wed, 20 Jul 2016 11:12:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPtAr-00052x-LR for qemu-devel@nongnu.org; Wed, 20 Jul 2016 11:12:37 -0400 Date: Wed, 20 Jul 2016 12:12:35 -0300 From: Eduardo Habkost Message-ID: <20160720151235.GB11412@thinpad.lan.raisama.net> References: <1467786055-85835-1-git-send-email-imammedo@redhat.com> <1467786055-85835-5-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467786055-85835-5-git-send-email-imammedo@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 04/19] pc: cpu: consolidate apic-id validity checks in pc_cpu_pre_plug() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, pkrempa@redhat.com, mst@redhat.com, armbru@redhat.com, eduardo.otubo@profitbricks.com, marcel@redhat.com, pbonzini@redhat.com, rth@twiddle.net 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