Add casts for compatibility purposes

Some non-Linux platforms return a (caddr_t *) result for the return
value of mmap(), which is very unfortunate. Add a (void *) cast to
explicitly avoid the warning when compiling with -Werror.

For the IO vector related stuff, signed vs. unsigned comes into play so
adding a (void *) cast here is technically correct for all platforms.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
This commit is contained in:
Dan McGee 2012-02-13 13:53:32 -06:00 committed by Marc-André Lureau
parent e571bd02c9
commit df2dcb496e

View File

@ -525,7 +525,7 @@ int spice_marshaller_fill_iovec(SpiceMarshaller *m, struct iovec *vec,
if (v == n_vec) {
return v; /* Not enough space in vec */
}
vec[v].iov_base = item->data + skip_bytes;
vec[v].iov_base = (void *)item->data + skip_bytes;
vec[v].iov_len = item->len - skip_bytes;
skip_bytes = 0;
v++;