From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MP53m-0002YK-Nt for qemu-devel@nongnu.org; Thu, 09 Jul 2009 21:37:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MP53i-0002We-5J for qemu-devel@nongnu.org; Thu, 09 Jul 2009 21:37:58 -0400 Received: from [199.232.76.173] (port=45563 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MP53h-0002WY-Vx for qemu-devel@nongnu.org; Thu, 09 Jul 2009 21:37:54 -0400 Received: from verein.lst.de ([213.95.11.210]:50329) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MP53h-0007El-GQ for qemu-devel@nongnu.org; Thu, 09 Jul 2009 21:37:53 -0400 Date: Fri, 10 Jul 2009 03:37:50 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 1/2] qemu-io: small cleanups for the aio code Message-ID: <20090710013749.GA18702@lst.de> References: <20090701112018.GA10455@lst.de> <4A564CF3.2040005@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A564CF3.2040005@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Christoph Hellwig , qemu-devel@nongnu.org On Thu, Jul 09, 2009 at 03:02:59PM -0500, Anthony Liguori wrote: > >- if (memcmp(ctx->buf, cmp_buf, total)) { > >+ memset(cmp_buf, ctx->pattern, ctx->qiov.size); > >+ if (memcmp(ctx->buf, cmp_buf, ctx->qiov.size)) { > > printf("Pattern verification failed at offset %lld, " > > "%d bytes\n", > >- (long long) ctx->offset, total); > >+ (long long) ctx->offset, ctx->qiov.size); > > > > This breaks the build because ctx->qiov.size is a size_t and your format > parameter is a %d. Work fine on 32 bit x86 :) But yeah, the correct format that works on all platforms would be %zd.