[PATCH synaptics] Constify priv->device
Daniel Stone
daniel at fooishbar.org
Wed Jan 4 09:02:30 PST 2012
Fixes a compiler warning due to discarding the const qualifier as it
comes back from the option code.
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
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..0a52801 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);
+ (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.3
More information about the xorg-devel
mailing list