Commit 0a656f5f21553b9b69392d89e28d18361a0e3405

Authored by malc
1 parent 9f8fd694

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>
migration-tcp.c
... ... @@ -58,7 +58,7 @@ static void tcp_wait_for_connect(void *opaque)
58 58  
59 59 dprintf("connect completed\n");
60 60 do {
61   - ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, &val, &valsize);
  61 + ret = getsockopt(s->fd, SOL_SOCKET, SO_ERROR, (void *) &val, &valsize);
62 62 } while (ret == -1 && (s->get_error(s)) == EINTR);
63 63  
64 64 if (ret < 0) {
... ...
... ... @@ -169,7 +169,8 @@ int tcp_socket_incoming(const char *address, uint16_t port)
169 169 memcpy(&addr.sin_addr.s_addr, &in, sizeof(in));
170 170  
171 171 opt = 1;
172   - if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1) {
  172 + if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
  173 + (const void *) &opt, sizeof(opt)) == -1) {
173 174 goto error;
174 175 }
175 176  
... ...
slirp/slirp.c
... ... @@ -468,7 +468,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds)
468 468 /* Connected */
469 469 so->so_state &= ~SS_ISFCONNECTING;
470 470  
471   - ret = send(so->s, &ret, 0, 0);
  471 + ret = send(so->s, (const void *) &ret, 0, 0);
472 472 if (ret < 0) {
473 473 /* XXXXX Must fix, zero bytes is a NOP */
474 474 if (errno == EAGAIN || errno == EWOULDBLOCK ||
... ...