From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOz7A-0002h3-OV for qemu-devel@nongnu.org; Thu, 09 Jul 2009 15:17:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOz76-0002eU-4d for qemu-devel@nongnu.org; Thu, 09 Jul 2009 15:17:04 -0400 Received: from [199.232.76.173] (port=41528 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOz75-0002eM-Pm for qemu-devel@nongnu.org; Thu, 09 Jul 2009 15:16:59 -0400 Received: from wa-out-1112.google.com ([209.85.146.181]:13665) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOz75-0006nj-Gr for qemu-devel@nongnu.org; Thu, 09 Jul 2009 15:16:59 -0400 Received: by wa-out-1112.google.com with SMTP id k17so42921waf.18 for ; Thu, 09 Jul 2009 12:16:58 -0700 (PDT) Message-ID: <4A564227.90904@codemonkey.ws> Date: Thu, 09 Jul 2009 14:16:55 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] fix hw/scsi-disk.c compile errors References: <4A4BF3FB.90805@earthlink.net> <4A4C57DA.8010202@redhat.com> <4A4C94CF.1080002@earthlink.net> In-Reply-To: <4A4C94CF.1080002@earthlink.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Robert Reif Cc: Gerd Hoffmann , qemu-devel Robert Reif wrote: > Gerd Hoffmann wrote: >> 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 ‘scsi_send_command’: >>> /home/reif/qemu/hw/scsi-disk.c:797: error: format ‘%d’ expects type >>> ‘int’, but argument 2 has type ‘uint64_t’ >> >> > - DPRINTF("Synchronise cache (sector %d, count %d)\n", lba, >> len); >> > + DPRINTF("Synchronise cache (sector %lld, count %d)\n", >> lba, len); >> >> Doesn't work. Well, it works on 32bit, but will fail on 64bit. Use >> the macros provided by inttypes.h instead, i.e. >> >> "... (sector %" PRId64 ", count ...", lba >> >> > Here is a revised patch that uses PRIu64 because lba is a uint64_t. > This patch fixes the 2 %d that were giving an error and 2 %lld that > were wrong. Need to resend as a top level patch and included a SoB. Regards, Anthony Liguori