[PATCH synaptics 1/3] Constify priv->device

Peter Hutterer peter.hutterer at who-t.net
Mon Jan 2 17:19:31 PST 2012


synaptics.c: In function 'SynapticsPreInit':
synaptics.c:731:18: warning: assignment discards 'const' qualifier from
pointer target type [enabled by default]

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/properties.c   |    2 +-
 src/synapticsstr.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/properties.c b/src/properties.c
index f15a6fb..2affc17 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -315,7 +315,7 @@ InitDeviceProperties(InputInfoPtr pInfo)
         prop_device_node = MakeAtom(XI_PROP_DEVICE_NODE, strlen(XI_PROP_DEVICE_NODE), TRUE);
         XIChangeDeviceProperty(pInfo->dev, prop_device_node, XA_STRING, 8,
                                PropModeReplace, strlen(priv->device),
-                               priv->device, FALSE);
+                               (const pointer)priv->device, FALSE);
         XISetDevicePropertyDeletable(pInfo->dev, prop_device_node, FALSE);
     }
 
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index 1ec8246..d74ebcd 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -185,7 +185,7 @@ typedef struct _SynapticsPrivateRec
 
     struct SynapticsHwState hwState;
 
-    char *device;			/* device node */
+    const char *device;			/* device node */
     Bool shm_config;			/* True when shared memory area allocated */
 
     CARD32 timer_time;			/* when timer last fired */
-- 
1.7.7.4



More information about the xorg-devel mailing list