From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQbaw-0006io-J0 for qemu-devel@nongnu.org; Fri, 12 Apr 2013 06:52:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQbav-0002WZ-CL for qemu-devel@nongnu.org; Fri, 12 Apr 2013 06:52:38 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34090 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQbav-0002Ph-5i for qemu-devel@nongnu.org; Fri, 12 Apr 2013 06:52:37 -0400 Message-ID: <5167E747.2020106@suse.de> Date: Fri, 12 Apr 2013 12:51:51 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1365730875-22854-1-git-send-email-aik@ozlabs.ru> In-Reply-To: <1365730875-22854-1-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] bswap: fix compiler warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Anthony Liguori , Stefan Hajnoczi , qemu-devel@nongnu.org, Blue Swirl , Paolo Bonzini , Richard Henderson , David Gibson Am 12.04.2013 03:41, schrieb Alexey Kardashevskiy: > The bswap functions use memcpy but the bswap.h header itself does not s= eem to > include it in some configuration such as cross compiling for powerpc64 > on x86_64 machine (gcc 4.6.3 from ftp.kernel.org, headers/libs from FC1= 8/ppc64), > the example warning is below. >=20 > The patch explicitly includes string.h. >=20 > CC ppc64-softmmu/hw/virtio/virtio.o > In file included from /home/alexey/qemu/include/libfdt_env.h:22:0, > from /home/alexey/qemu/../lib4qemu/usr/include/libfdt.= h:54, > from /home/alexey/qemu/hw/nvram/spapr_nvram.c:25: > /home/alexey/qemu/include/qemu/bswap.h: In function 'lduw_p': > /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: implicit declara= tion of function 'memcpy' [-Wimplicit-function-declaration] > /home/alexey/qemu/include/qemu/bswap.h:244:5: warning: incompatible imp= licit declaration of built-in function 'memcpy' [enabled by default] >=20 > Signed-off-by: Alexey Kardashevskiy > --- > include/qemu/bswap.h | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h > index d3af35d..d50de0d 100644 > --- a/include/qemu/bswap.h > +++ b/include/qemu/bswap.h > @@ -1,6 +1,8 @@ > #ifndef BSWAP_H > #define BSWAP_H > =20 > +#include > + > #include "config-host.h" > #include > #include Including string.h is certainly the right thing to do, but why do you single it out first? Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg