[PATCH 04/25] verify_internal_event: preserve constness of data pointer

Alan Coopersmith alan.coopersmith at oracle.com
Sun Dec 11 10:16:17 PST 2011


All we're using it for is ErrorF calls, so make it a const char *
to stop gcc from warning:

inpututils.c: In function 'verify_internal_event':
inpututils.c:629:9: warning: cast discards qualifiers from pointer target type

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 dix/inpututils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dix/inpututils.c b/dix/inpututils.c
index 60f9fa0..5e2ab87 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -626,7 +626,7 @@ void verify_internal_event(const InternalEvent *ev)
     if (ev && ev->any.header != ET_Internal)
     {
         int i;
-        unsigned char *data = (unsigned char*)ev;
+        const unsigned char *data = (const unsigned char*)ev;
 
         ErrorF("dix: invalid event type %d\n", ev->any.header);
 
-- 
1.7.3.2



More information about the xorg-devel mailing list