[PATCH 11/25] WriteToClient: preserve constness of buf while extracting length value
Alan Coopersmith
alan.coopersmith at oracle.com
Sun Dec 11 10:16:24 PST 2011
Fixes gcc warning:
io.c: In function 'WriteToClient':
io.c:826:6: warning: cast discards qualifiers from pointer target type
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
os/io.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/os/io.c b/os/io.c
index 955bf8b..ebb8216 100644
--- a/os/io.c
+++ b/os/io.c
@@ -823,7 +823,7 @@ WriteToClient (ClientPtr who, int count, const void *__buf)
CARD32 replylen;
unsigned long bytesleft;
- replylen = ((xGenericReply *)buf)->length;
+ replylen = ((const xGenericReply *)buf)->length;
if (who->swapped)
swapl(&replylen);
bytesleft = (replylen * 4) + SIZEOF(xReply) - count - padBytes;
--
1.7.3.2
More information about the xorg-devel
mailing list