From patchwork Mon Oct 19 08:21:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamalesh Babulal X-Patchwork-Id: 36365 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F3C55B7B77 for ; Mon, 19 Oct 2009 19:22:16 +1100 (EST) Received: from localhost ([127.0.0.1]:55314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MznVE-0004lc-1O for incoming@patchwork.ozlabs.org; Mon, 19 Oct 2009 04:22:04 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MznUj-0004iH-7f for qemu-devel@nongnu.org; Mon, 19 Oct 2009 04:21:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MznUe-0004dG-CN for qemu-devel@nongnu.org; Mon, 19 Oct 2009 04:21:32 -0400 Received: from [199.232.76.173] (port=33428 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MznUe-0004cz-8S for qemu-devel@nongnu.org; Mon, 19 Oct 2009 04:21:28 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:53824) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MznUd-0001I4-1I for qemu-devel@nongnu.org; Mon, 19 Oct 2009 04:21:28 -0400 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp01.au.ibm.com (8.14.3/8.13.1) with ESMTP id n9J8JfUC031772 for ; Mon, 19 Oct 2009 19:19:41 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n9J8L7EN1458234 for ; Mon, 19 Oct 2009 19:21:07 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id n9J8L77u006547 for ; Mon, 19 Oct 2009 19:21:07 +1100 Received: from linux.vnet.ibm.com (ChanaKya-009124158038.in.ibm.com [9.124.158.38]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with SMTP id n9J8L4ZW006392; Mon, 19 Oct 2009 19:21:04 +1100 Date: Mon, 19 Oct 2009 13:51:02 +0530 From: Kamalesh Babulal To: Laurent Vivier Subject: Re: [Qemu-devel] qemu-0.11.50 build breaks at monitor.c Message-ID: <20091019082102.GB5935@linux.vnet.ibm.com> References: <14911684.3852291255938621589.JavaMail.servlet@kundenserver> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <14911684.3852291255938621589.JavaMail.servlet@kundenserver> User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: mtosatti@redhat.com, qemu-devel@nongnu.org X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kamalesh Babulal List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org * Laurent Vivier [2009-10-19 09:50:21]: > >Hi Marcelo, > > > > qemu-0.11.50 build breaks with > > > >CC x86_64-softmmu/monitor.o > >cc1: warnings being treated as errors > >/other/srcs/qemu-kvm/monitor.c: In function 'print_cpu_iter': > >/other/srcs/qemu-kvm/monitor.c:450: error: format '%ld' expects type 'long > >int', but argument 3 has type 'int64_t' > >make[3]: *** [monitor.o] Error 1 > > > >Changes to print_cpu_iter was introduced by > > > >commit 00ee594280d46290629ccd5fcd1b5c1a21605e4c > >Author: Marcelo Tosatti > >Date: Wed Oct 14 19:21:10 2009 -0300 > > > > Add missing thread_id field in "info cpus" > > > >typecasting it int long, helps > > > > monitor.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > >diff --git a/monitor.c b/monitor.c > >index b4c4878..5416fdb 100644 > >--- a/monitor.c > >+++ b/monitor.c > >@@ -447,7 +447,7 @@ static void print_cpu_iter(QObject *obj, void *opaque) > > if (strcmp(qdict_get_str(cpu, "halted"), "yes") == 0) > > monitor_printf(mon, " (halted)"); > > > >- monitor_printf(mon, " thread_id=%ld", qdict_get_int(cpu, "thread_id")); > >+ monitor_printf(mon, " thread_id=%ld", (int long)qdict_get_int(cpu, > >"thread_id")); > > You should use %PRId64 instead of %ld. Hi Laurent, Thanks for the review. Resending the patch with changes recommended by Laurent. Signed-off-by: Kamalesh Babulal --- monitor.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) > > Regards, > Laurent Kamalesh diff --git a/monitor.c b/monitor.c index b4c4878..bae2122 100644 --- a/monitor.c +++ b/monitor.c @@ -447,7 +447,8 @@ static void print_cpu_iter(QObject *obj, void *opaque) if (strcmp(qdict_get_str(cpu, "halted"), "yes") == 0) monitor_printf(mon, " (halted)"); - monitor_printf(mon, " thread_id=%ld", qdict_get_int(cpu, "thread_id")); + monitor_printf(mon, " thread_id=%" PRId64 " ", + qdict_get_int(cpu, "thread_id")); monitor_printf(mon, "\n"); }