From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mzn0k-0001kT-Ah for qemu-devel@nongnu.org; Mon, 19 Oct 2009 03:50:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mzn0f-0001jt-AP for qemu-devel@nongnu.org; Mon, 19 Oct 2009 03:50:33 -0400 Received: from [199.232.76.173] (port=46630 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mzn0f-0001jq-3f for qemu-devel@nongnu.org; Mon, 19 Oct 2009 03:50:29 -0400 Received: from moutng.kundenserver.de ([212.227.126.177]:51848) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mzn0e-0005dP-2R for qemu-devel@nongnu.org; Mon, 19 Oct 2009 03:50:28 -0400 Message-Id: <14911684.3852291255938621589.JavaMail.servlet@kundenserver> From: Laurent Vivier Subject: RE: [Qemu-devel] qemu-0.11.50 build breaks at monitor.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 19 Oct 2009 09:50:21 +0200 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kamalesh@linux.vnet.ibm.com, mtosatti@redhat.com Cc: qemu-devel@nongnu.org >Hi Marcelo, > >=09qemu-0.11.50 build breaks with=20 > >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= =20 >int', but argument 3 has type 'int64_t' >make[3]: *** [monitor.o] Error 1 > >Changes to print_cpu_iter was introduced by=20 > >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") =3D=3D 0) > monitor_printf(mon, " (halted)"); >=20 >- monitor_printf(mon, " thread_id=3D%ld", qdict_get_int(cpu, "thread_id= ")); >+ monitor_printf(mon, " thread_id=3D%ld", (int long)qdict_get_int(cpu,= =20 >"thread_id")); You should use %PRId64 instead of %ld. Regards, Laurent --=20 --------------------- Laurent@vivier.eu --------------------- "Tout ce qui est impossible reste =C3=A0 accomplir" Jules Verne "Things are only impossible until they're not" Jean-Luc Picard