[PATCH lib/libX11] Don't use caddr_t casts

Jon TURNEY jon.turney at dronecode.org.uk
Fri Oct 28 09:09:20 PDT 2011


(caddr_t) isn't used anywhere else in xcb or libX11.
Cast to (char *) for consistency.

Removing this cast allows building for MinGW without patching.

v2: Cast to (char *) rather than just dropping the cast

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..300ef57 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 = (char *)data;
 	vec[1].iov_len = size;
-	vec[2].iov_base = (caddr_t) pad;
+	vec[2].iov_base = (char *)pad;
 	vec[2].iov_len = -size & 3;
 
 	for(ext = dpy->flushes; ext; ext = ext->next_flush)
-- 
1.7.9


--------------060004070608000907050605--


More information about the xorg-devel mailing list