[PATCH lib/libX11] Don't use caddr_t casts
Jon TURNEY
jon.turney at dronecode.org.uk
Sat Feb 18 09:21:24 PST 2012
Casting a (const char *) to (caddr_t) to assign to iovec.io_base
seems pointless. caddr_t isn't used anywhere else in xcb or libX11
Removing this cast allows building on MinGW without patching.
Note: there's a warning about dropping constness here, but that's
going to be unfixable as long as xcb_writev() takes a non-const struct
iovec as a parameter.
Cc: Ryan Pavlik <rpavlik at iastate.edu>
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
src/xcb_io.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/xcb_io.c b/src/xcb_io.c
index 0af47d8..9702d87 100644
--- a/src/xcb_io.c
+++ b/src/xcb_io.c
@@ -478,9 +478,9 @@ void _XSend(Display *dpy, const char *data, long size)
vec[0].iov_base = dpy->buffer;
vec[0].iov_len = dpy->bufptr - dpy->buffer;
- vec[1].iov_base = (caddr_t) data;
+ vec[1].iov_base = data;
vec[1].iov_len = size;
- vec[2].iov_base = (caddr_t) pad;
+ vec[2].iov_base = pad;
vec[2].iov_len = -size & 3;
for(ext = dpy->flushes; ext; ext = ext->next_flush)
--
1.7.9
More information about the xorg-devel
mailing list