diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-06-13 08:44:31 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-06-13 08:44:31 +0000 |
commit | 8d564c8dda7fb517cdf1e7b19530dfda68ff8f31 (patch) | |
tree | 193b8be4f6c9dac6664e03c7cdcf2bce8eb3bf16 /qemu-char.c | |
parent | d72c6bfa15ca697adf6d6b0785f623e3c79ee7c7 (diff) | |
download | qemu-8d564c8dda7fb517cdf1e7b19530dfda68ff8f31.tar.gz qemu-8d564c8dda7fb517cdf1e7b19530dfda68ff8f31.tar.bz2 qemu-8d564c8dda7fb517cdf1e7b19530dfda68ff8f31.zip |
Fix mingw32 build warnings
Work around buffer and ioctlsocket argument type signedness problems
Suppress a prototype which is unused on mingw32
Expand a macro to avoid warnings from some GCC versions
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qemu-char.c b/qemu-char.c index 1c0c9f5dff..a63d860b83 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1708,7 +1708,7 @@ static int udp_chr_write(CharDriverState *chr, const uint8_t *buf, int len) { NetCharDriver *s = chr->opaque; - return sendto(s->fd, buf, len, 0, + return sendto(s->fd, (void *)buf, len, 0, (struct sockaddr *)&s->daddr, sizeof(struct sockaddr_in)); } @@ -1737,7 +1737,7 @@ static void udp_chr_read(void *opaque) if (s->max_size == 0) return; - s->bufcnt = recv(s->fd, s->buf, sizeof(s->buf), 0); + s->bufcnt = recv(s->fd, (void *)s->buf, sizeof(s->buf), 0); s->bufptr = s->bufcnt; if (s->bufcnt <= 0) return; @@ -1913,7 +1913,7 @@ static void tcp_chr_read(void *opaque) len = sizeof(buf); if (len > s->max_size) len = s->max_size; - size = recv(s->fd, buf, len, 0); + size = recv(s->fd, (void *)buf, len, 0); if (size == 0) { /* connection closed */ s->connected = 0; |