diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-07-23 20:04:29 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-07-25 14:38:56 +0000 |
commit | 00aa0040e8b8ec45a75be4e8926a84b82cc75838 (patch) | |
tree | 2bd4340f2a9e31edb18910eaef0ccf1f694bcacb /ui | |
parent | aad04cd024f0c59f0b96f032cde2e24eb3abba6d (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 'ui')
-rw-r--r-- | ui/vnc-tls.c | 2 | ||||
-rw-r--r-- | ui/vnc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c index dec626c539..31f1467ad0 100644 --- a/ui/vnc-tls.c +++ b/ui/vnc-tls.c @@ -89,7 +89,7 @@ static ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport, int ret; retry: - ret = recv(vs->csock, data, len, 0); + ret = qemu_recv(vs->csock, data, len, 0); if (ret < 0) { if (errno == EINTR) goto retry; @@ -1199,7 +1199,7 @@ long vnc_client_read_buf(VncState *vs, uint8_t *data, size_t datalen) } } else #endif /* CONFIG_VNC_TLS */ - ret = recv(vs->csock, (void *)data, datalen, 0); + ret = qemu_recv(vs->csock, data, datalen, 0); VNC_DEBUG("Read wire %p %zd -> %ld\n", data, datalen, ret); return vnc_client_io_error(vs, ret, socket_error()); } |