Xi: fix "discards ''const' qualifier" warnings
extinit.c: In function 'XInputExtensionInit': extinit.c:1301:29: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] extinit.c:1303:36: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] property.c: In function 'XIChangeDeviceProperty': xiproperty.c:757:39: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
e42bf98283
commit
ae1c48ebc8
|
@ -1137,6 +1137,9 @@ IResetProc(ExtensionEntry * unused)
|
||||||
EventSwapVector[DevicePresenceNotify] = NotImplemented;
|
EventSwapVector[DevicePresenceNotify] = NotImplemented;
|
||||||
EventSwapVector[DevicePropertyNotify] = NotImplemented;
|
EventSwapVector[DevicePropertyNotify] = NotImplemented;
|
||||||
RestoreExtensionEvents();
|
RestoreExtensionEvents();
|
||||||
|
|
||||||
|
free(xi_all_devices.name);
|
||||||
|
free(xi_all_master_devices.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1298,9 +1301,9 @@ XInputExtensionInit(void)
|
||||||
memset(&xi_all_devices, 0, sizeof(xi_all_devices));
|
memset(&xi_all_devices, 0, sizeof(xi_all_devices));
|
||||||
memset(&xi_all_master_devices, 0, sizeof(xi_all_master_devices));
|
memset(&xi_all_master_devices, 0, sizeof(xi_all_master_devices));
|
||||||
xi_all_devices.id = XIAllDevices;
|
xi_all_devices.id = XIAllDevices;
|
||||||
xi_all_devices.name = "XIAllDevices";
|
xi_all_devices.name = strdup("XIAllDevices");
|
||||||
xi_all_master_devices.id = XIAllMasterDevices;
|
xi_all_master_devices.id = XIAllMasterDevices;
|
||||||
xi_all_master_devices.name = "XIAllMasterDevices";
|
xi_all_master_devices.name = strdup("XIAllMasterDevices");
|
||||||
|
|
||||||
inputInfo.all_devices = &xi_all_devices;
|
inputInfo.all_devices = &xi_all_devices;
|
||||||
inputInfo.all_master_devices = &xi_all_master_devices;
|
inputInfo.all_master_devices = &xi_all_master_devices;
|
||||||
|
|
|
@ -754,7 +754,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (new_data)
|
if (new_data)
|
||||||
memcpy((char *) new_data, (char *) value, len * size_in_bytes);
|
memcpy((char *) new_data, value, len * size_in_bytes);
|
||||||
if (old_data)
|
if (old_data)
|
||||||
memcpy((char *) old_data, (char *) prop_value->data,
|
memcpy((char *) old_data, (char *) prop_value->data,
|
||||||
prop_value->size * size_in_bytes);
|
prop_value->size * size_in_bytes);
|
||||||
|
|
Loading…
Reference in New Issue