A warning from free() can be avoided by casting the constness away
from its argument pointer or by not declaring the pointer as const in
the first place.

Signed-off-by: Rami Ylimäki <rami.ylim...@vincit.fi>
---
 src/evdev.c |    2 +-
 src/evdev.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index db62375..474d20d 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2171,7 +2171,7 @@ EvdevUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int 
flags)
         /* Release strings allocated in EvdevAddKeyClass. */
         XkbFreeRMLVOSet(&pEvdev->rmlvo, FALSE);
         /* Release string allocated in EvdevOpenDevice. */
-        free((void *)pEvdev->device); /* (const char *) */
+        free(pEvdev->device);
         pEvdev->device = NULL;
     }
     xf86DeleteInput(pInfo, flags);
diff --git a/src/evdev.h b/src/evdev.h
index f640fdd..80e4580 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -116,7 +116,7 @@ typedef struct {
 } EventQueueRec, *EventQueuePtr;
 
 typedef struct {
-    const char *device;
+    char *device;
     int grabDevice;         /* grab the event device? */
 
     int num_vals;           /* number of valuators */
-- 
1.6.3.3

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to