summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRami Ylimäki <rami.ylimaki@vincit.fi>2011-03-08 11:23:47 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2011-03-09 15:28:10 +1000
commit41111ce1efc6181b8da042c5b01f01cdf92315be (patch)
treea80c572160cbf63974bae47bc911ac12473c5522
parentb4c47d5f9454a708a5ab161c015646f2ca6e1ac3 (diff)
Remove constness of device filename to avoid warning when freed.
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.ylimaki@vincit.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev.c4
-rw-r--r--src/evdev.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/evdev.c b/src/evdev.c
index b62caa2..ab46277 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1788,7 +1788,7 @@ static int
EvdevOpenDevice(InputInfoPtr pInfo)
{
EvdevPtr pEvdev = pInfo->private;
- char *device = (char*)pEvdev->device;
+ char *device = pEvdev->device;
if (!device)
{
@@ -1835,7 +1835,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 5df7d3e..c16ccb2 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -104,7 +104,7 @@ typedef struct {
} EventQueueRec, *EventQueuePtr;
typedef struct {
- const char *device;
+ char *device;
int grabDevice; /* grab the event device? */
int num_vals; /* number of valuators */