diff options
author | Stefan Weil <weil@mail.berlios.de> | 2009-06-13 13:05:27 +0200 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-06-13 14:22:03 +0300 |
commit | c64caa437f06362e78677a61035129b95c21e396 (patch) | |
tree | c7f63f056610b73baff5a5ac832b5f6958e5cc12 | |
parent | 8d564c8dda7fb517cdf1e7b19530dfda68ff8f31 (diff) | |
download | qemu-c64caa437f06362e78677a61035129b95c21e396.tar.gz qemu-c64caa437f06362e78677a61035129b95c21e396.tar.bz2 qemu-c64caa437f06362e78677a61035129b95c21e396.zip |
Win32: Don't remove const attribute in type casts.
Type casts removing the const attribute are bad because
they hide the fact that the argument remains const.
They also result in a compiler warning (at least with MS-C).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
-rw-r--r-- | net.c | 2 | ||||
-rw-r--r-- | qemu-char.c | 2 | ||||
-rw-r--r-- | vnc.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -1507,7 +1507,7 @@ static ssize_t net_socket_receive_dgram(VLANClientState *vc, const uint8_t *buf, { NetSocketState *s = vc->opaque; - return sendto(s->fd, (void *)buf, size, 0, + return sendto(s->fd, (const void *)buf, size, 0, (struct sockaddr *)&s->dgram_dst, sizeof(s->dgram_dst)); } diff --git a/qemu-char.c b/qemu-char.c index a63d860b83..a8afe94fa7 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, (void *)buf, len, 0, + return sendto(s->fd, (const void *)buf, len, 0, (struct sockaddr *)&s->daddr, sizeof(struct sockaddr_in)); } @@ -961,7 +961,7 @@ long vnc_client_write_buf(VncState *vs, const uint8_t *data, size_t datalen) } } else #endif /* CONFIG_VNC_TLS */ - ret = send(vs->csock, (void *)data, datalen, 0); + ret = send(vs->csock, (const void *)data, datalen, 0); VNC_DEBUG("Wrote wire %p %zd -> %ld\n", data, datalen, ret); return vnc_client_io_error(vs, ret, socket_error()); } |