From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K8rQD-00071q-3t for qemu-devel@nongnu.org; Wed, 18 Jun 2008 02:45:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K8rQA-00071T-FB for qemu-devel@nongnu.org; Wed, 18 Jun 2008 02:45:31 -0400 Received: from [199.232.76.173] (port=53408 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K8rQA-00071Q-9h for qemu-devel@nongnu.org; Wed, 18 Jun 2008 02:45:30 -0400 Received: from tapir.sajinet.com.pe ([66.139.79.212]:39474) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K8rQ8-0002Vw-Lw for qemu-devel@nongnu.org; Wed, 18 Jun 2008 02:45:29 -0400 Date: Wed, 18 Jun 2008 02:08:37 -0500 From: Carlo Marcelo Arenas Belon Subject: Re: [Qemu-devel] [PATCH] NBD cleanup Message-ID: <20080618070837.GC1486@tapir> References: <1212841460.7985.6.camel@frecb07144> <4851582E.6030404@codemonkey.ws> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: <4851582E.6030404@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 12, 2008 at 12:09:02PM -0500, Anthony Liguori wrote: > Laurent Vivier wrote: > >This patch removes include of malloc.h from qemu-nbd.c to make it > >compile on OS X. (as reported by C.W. Betts and commented by Daniel P. > >Berrange) > >It adjusts a printf format in nbd.c. this last snippet avoids the following warning on amd64 linux (and other LP64 platforms) : nbd.c: In function `nbd_trip': nbd.c:391: warning: unsigned int format, different type arg (arg 7) but will trigger something similar in x86 linux (and other ILP32 platforms) where sizeof returns unsigned instead. to prevent this line to keep getting changed back and forth (as shown by r4676 and the two currently proposed patches that touch nbd) to avoid this warning; casting it to unsigned long as suggested in the attached patch (to be applied instead of this one) should be enough, if probably not that elegant. > Reviewed-by: Anthony Liguori Reviewed-by: Carlo Marcelo Arenas Belon Carlo --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="qemu-nbd-cleanup.patch" Index: nbd.c =================================================================== --- nbd.c (revision 4745) +++ nbd.c (working copy) @@ -388,8 +388,8 @@ } if (len > sizeof(data)) { - LOG("len (%u) is larger than max len (%u)", - len, sizeof(data)); + LOG("len (%u) is larger than max len (%lu)", + len, (unsigned long)sizeof(data)); errno = EINVAL; return -1; } Index: qemu-nbd.c =================================================================== --- qemu-nbd.c (revision 4745) +++ qemu-nbd.c (working copy) @@ -21,7 +21,6 @@ #include "block_int.h" #include "nbd.h" -#include #include #include #include --Nq2Wo0NMKNjxTN9z--