aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-06-13 08:44:31 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-06-13 08:44:31 +0000
commitc5b76b381081680633e2e0a91216507430409fb2 (patch)
tree193b8be4f6c9dac6664e03c7cdcf2bce8eb3bf16 /qemu-char.c
parent487fefdb1e94098ea734cb10e9e17d5860dde2d1 (diff)
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.c6
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;