[gnome-color-manager] Fix GcmSensorHuey when using verbose mode on 64 bit machines
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Fix GcmSensorHuey when using verbose mode on 64 bit machines
- Date: Wed, 13 Oct 2010 08:01:41 +0000 (UTC)
commit 0c4475f64764693e5a3fa4e5e1a88c8e3491189a
Author: Richard Hughes <richard hughsie com>
Date: Tue Oct 12 13:12:56 2010 +0100
Fix GcmSensorHuey when using verbose mode on 64 bit machines
On 64bit we can't just cast a gsize pointer to a gint pointer, we have to copy.
libcolor-glib/gcm-sensor-huey.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/libcolor-glib/gcm-sensor-huey.c b/libcolor-glib/gcm-sensor-huey.c
index 3267c36..4b2c671 100644
--- a/libcolor-glib/gcm-sensor-huey.c
+++ b/libcolor-glib/gcm-sensor-huey.c
@@ -124,6 +124,7 @@ gcm_sensor_huey_send_data (GcmSensorHuey *sensor_huey,
gint retval;
gboolean ret = FALSE;
guint i;
+ gint reply_read_raw;
libusb_device_handle *handle;
g_return_val_if_fail (request != NULL, FALSE);
@@ -154,7 +155,7 @@ gcm_sensor_huey_send_data (GcmSensorHuey *sensor_huey,
/* get sync response */
retval = libusb_interrupt_transfer (handle, 0x81,
- reply, (gint) reply_len, (gint*)reply_read,
+ reply, (gint) reply_len, &reply_read_raw,
HUEY_CONTROL_MESSAGE_TIMEOUT);
if (retval < 0) {
g_set_error (error, GCM_SENSOR_ERROR,
@@ -163,6 +164,10 @@ gcm_sensor_huey_send_data (GcmSensorHuey *sensor_huey,
goto out;
}
+ /* on 64bit we can't just cast a gsize pointer to a
+ * gint pointer, we have to copy */
+ *reply_read = reply_read_raw;
+
/* show what we've got */
gcm_sensor_huey_print_data ("reply", reply, *reply_read);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]