From af4113bfeb1d155f5f037c3492e50513336fa4a7 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 12 Dec 2011 16:49:33 -0800 Subject: [PATCH] WriteToClient: preserve constness of buf while extracting length value 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 Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer --- os/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/io.c b/os/io.c index 955bf8b73..ebb821653 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;