summaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-07-23 20:04:29 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-07-25 14:38:56 +0000
commit00aa0040e8b8ec45a75be4e8926a84b82cc75838 (patch)
tree2bd4340f2a9e31edb18910eaef0ccf1f694bcacb /qemu-char.c
parentaad04cd024f0c59f0b96f032cde2e24eb3abba6d (diff)
Wrap recv to avoid warnings
Avoid warnings like these by wrapping recv(): CC slirp/ip_icmp.o /src/qemu/slirp/ip_icmp.c: In function 'icmp_receive': /src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror] /usr/local/lib/gcc/i686-mingw32msvc/4.6.0/../../../../i686-mingw32msvc/include/winsock2.h:547:32: note: expected 'char *' but argument is of type 'struct icmp *' Remove also casts used to avoid warnings. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 2982bfd7b..8e8cf31a2 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1860,7 +1860,7 @@ static void udp_chr_read(void *opaque)
if (s->max_size == 0)
return;
- s->bufcnt = recv(s->fd, (void *)s->buf, sizeof(s->buf), 0);
+ s->bufcnt = qemu_recv(s->fd, s->buf, sizeof(s->buf), 0);
s->bufptr = s->bufcnt;
if (s->bufcnt <= 0)
return;
@@ -2078,7 +2078,7 @@ static ssize_t tcp_chr_recv(CharDriverState *chr, char *buf, size_t len)
static ssize_t tcp_chr_recv(CharDriverState *chr, char *buf, size_t len)
{
TCPCharDriver *s = chr->opaque;
- return recv(s->fd, buf, len, 0);
+ return qemu_recv(s->fd, buf, len, 0);
}
#endif