aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2009-05-21 05:26:23 +0400
committermalc <av1474@comtv.ru>2009-05-21 05:30:51 +0400
commit0a656f5f21553b9b69392d89e28d18361a0e3405 (patch)
tree4b0474b563efb39f9c131885e6cdc1bae3516601
parent9f8fd69460b30bc3817deabd1d76455248b76da2 (diff)
Cast pointer arguments of get/setsockopt, send to void * to keep GCC
from producing a warning about pointer type mismatches with Winsock Signed-off-by: malc <av1474@comtv.ru>
-rw-r--r--migration-tcp.c2
-rw-r--r--nbd.c3
-rw-r--r--slirp/slirp.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/migration-tcp.c b/migration-tcp.c
index d9c4c986db..1f4358ee5f 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -58,7 +58,7 @@ static void tcp_wait_for_connect(void *opaque)
dprintf("connect completed\n");
do {
- ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, &val, &valsize);
+ ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, (void *) &val, &valsize);
} while (ret == -1 && (s->get_error(s)) == EINTR);
if (ret < 0) {
diff --git a/nbd.c b/nbd.c
index 1586ea7553..b397a5f487 100644
--- a/nbd.c
+++ b/nbd.c
@@ -169,7 +169,8 @@ int tcp_socket_incoming(const char *address, uint16_t port)
memcpy(&addr.sin_addr.s_addr, &in, sizeof(in));
opt = 1;
- if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1) {
+ if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
+ (const void *) &opt, sizeof(opt)) == -1) {
goto error;
}
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 4ca35b28f6..04d3dede23 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -468,7 +468,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds)
/* Connected */
so->so_state &= ~SS_ISFCONNECTING;
- ret = send(so->s, &ret, 0, 0);
+ ret = send(so->s, (const void *) &ret, 0, 0);
if (ret < 0) {
/* XXXXX Must fix, zero bytes is a NOP */
if (errno == EAGAIN || errno == EWOULDBLOCK ||