Received: from eggs.gnu.org ([208.118.235.92]:54411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEmUC-0006Jy-Qc for qemu-devel@nongnu.org; Thu, 20 Sep 2012 15:32:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEmU6-0007h4-HM for qemu-devel@nongnu.org; Thu, 20 Sep 2012 15:32:32 -0400 From: Stefan Weil Date: Thu, 20 Sep 2012 21:32:19 +0200 Message-Id: <1348169539-24797-1-git-send-email-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] net/socket: Fix compiler warning (regression for MinGW) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-trivial@nongnu.org, Stefan Weil , qemu-devel@nongnu.org Add a type cast which was removed by commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf again. Without it, MinGW compilers complain: net/socket.c:136: warning: pointer targets in passing argument 2 of =E2=80=98sendto=E2=80=99 differ= in signedness /usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/includ= e/winsock2.h:1313: note: expected =E2=80=98const char *=E2=80=99 but argument is of type =E2=80=98= const uint8_t *=E2=80=99 Signed-off-by: Stefan Weil --- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/socket.c b/net/socket.c index 69aad03..833f79f 100644 --- a/net/socket.c +++ b/net/socket.c @@ -131,7 +131,7 @@ static ssize_t net_socket_receive_dgram(NetClientStat= e *nc, const uint8_t *buf, ssize_t ret; =20 do { - ret =3D sendto(s->fd, buf, size, 0, + ret =3D sendto(s->fd, (const void *)buf, size, 0, (struct sockaddr *)&s->dgram_dst, sizeof(s->dgram_dst)); } while (ret =3D=3D -1 && errno =3D=3D EINTR); --=20 1.7.10