From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MMG4V-0000mF-Uu for qemu-devel@nongnu.org; Thu, 02 Jul 2009 02:47:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MMG4R-0000m3-5j for qemu-devel@nongnu.org; Thu, 02 Jul 2009 02:47:03 -0400 Received: from [199.232.76.173] (port=44140 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMG4Q-0000m0-Vx for qemu-devel@nongnu.org; Thu, 02 Jul 2009 02:46:59 -0400 Received: from mx20.gnu.org ([199.232.41.8]:45158) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MMG4Q-0006a4-Fg for qemu-devel@nongnu.org; Thu, 02 Jul 2009 02:46:58 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MMG4P-00052P-Ck for qemu-devel@nongnu.org; Thu, 02 Jul 2009 02:46:57 -0400 Message-ID: <4A4C57DA.8010202@redhat.com> Date: Thu, 02 Jul 2009 08:46:50 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] fix hw/scsi-disk.c compile errors References: <4A4BF3FB.90805@earthlink.net> In-Reply-To: <4A4BF3FB.90805@earthlink.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Robert Reif Cc: qemu-devel On 07/02/09 01:40, Robert Reif wrote: > This patch fixes 2 compile errors when debugging is enabled. > > CC scsi-disk.o > cc1: warnings being treated as errors > /home/reif/qemu/hw/scsi-disk.c: In function =91scsi_send_command=92: > /home/reif/qemu/hw/scsi-disk.c:797: error: format =91%d=92 expects type > =91int=92, but argument 2 has type =91uint64_t=92 > - DPRINTF("Synchronise cache (sector %d, count %d)\n", lba, len= ); > + DPRINTF("Synchronise cache (sector %lld, count %d)\n", lba,=20 len); Doesn't work. Well, it works on 32bit, but will fail on 64bit. Use the=20 macros provided by inttypes.h instead, i.e. "... (sector %" PRId64 ", count ...", lba cheers, Gerd