Received: from eggs.gnu.org ([208.118.235.92]:41857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFScw-0004yE-R0 for qemu-devel@nongnu.org; Sat, 22 Sep 2012 12:32:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFScu-0003d4-5k for qemu-devel@nongnu.org; Sat, 22 Sep 2012 12:32:22 -0400 Date: Sat, 22 Sep 2012 17:32:16 +0100 From: Stefan Hajnoczi Message-ID: <20120922163216.GC14154@stefanha-thinkpad.localdomain> References: <1348169539-24797-1-git-send-email-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1348169539-24797-1-git-send-email-sw@weilnetz.de> Subject: Re: [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 Weil Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org On Thu, Sep 20, 2012 at 09:32:19PM +0200, Stefan Weil wrote: > 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 ‘sendto’ differ in signedness > /usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/include/winsock2.h:1313: note: > expected ‘const char *’ but argument is of type ‘const uint8_t *’ Wow, that's messed up. sendto() is POSIX and the prototype shouldn't be const char *. It's easy for someone to remove this cast in the future. Please add a comment explaining that it's needed because MinGW headers don't have the POSIX version of sendto(). Thanks, Stefan