diff options
author | Javier Pello <javier.pello@urjc.es> | 2015-10-07 12:41:01 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-11-03 09:12:31 +1000 |
commit | 13f25bfb55f4a0bc1f614cbf9b0b13a50ecad8a0 (patch) | |
tree | 2aa741e47358cb3ddcf0506abaca21d46c48b1a4 /src | |
parent | 380861589690bcbe8b04b7a2c23b5dd5d10c4bf8 (diff) |
Fix const compiler warnings
When invoking Data, Data16 and Data32 from XChangeDeviceProperty,
we must cast the data pointer to the right type, but we do not need
to cast constness away. This change allows to enable -Wcast-qual on
the build and have it complete without warnings.
Signed-off-by: Javier Pello <javier.pello@urjc.es>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/XChDProp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/XChDProp.c b/src/XChDProp.c index c863cdb..786d664 100644 --- a/src/XChDProp.c +++ b/src/XChDProp.c @@ -74,7 +74,7 @@ XChangeDeviceProperty(Display* dpy, XDevice* dev, len = ((long)nelements + 3) >> 2; if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) { SetReqLen(req, len, len); - Data (dpy, (char *)data, nelements); + Data (dpy, (_Xconst char *)data, nelements); } /* else force BadLength */ break; @@ -83,7 +83,7 @@ XChangeDeviceProperty(Display* dpy, XDevice* dev, if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) { SetReqLen(req, len, len); len = (long)nelements << 1; - Data16 (dpy, (short *) data, len); + Data16 (dpy, (_Xconst short *) data, len); } /* else force BadLength */ break; @@ -92,7 +92,7 @@ XChangeDeviceProperty(Display* dpy, XDevice* dev, if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) { SetReqLen(req, len, len); len = (long)nelements << 2; - Data32 (dpy, (long *) data, len); + Data32 (dpy, (_Xconst long *) data, len); } /* else force BadLength */ break; |