diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-12-12 16:49:33 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-12-12 17:03:10 -0800 |
commit | af4113bfeb1d155f5f037c3492e50513336fa4a7 (patch) | |
tree | f62b95fd945a52ee4653edd1af897b3b252af6ea | |
parent | 2c9800f91559fbb12dd276cf0536631104092f67 (diff) |
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 <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | os/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |