summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2010-05-26 20:18:28 +0200
committerGravatar Martin Szulecki2010-05-27 00:45:02 +0200
commit75f7ce360a7cfd5a2fb25cf852fb9c4a6d0f38f4 (patch)
tree2d00bf191061a332aec1aa111fed2289e5455125 /src
parent588f72fd0816eef4853fae9f7eced5efe767a0fd (diff)
downloadlibimobiledevice-75f7ce360a7cfd5a2fb25cf852fb9c4a6d0f38f4.tar.gz
libimobiledevice-75f7ce360a7cfd5a2fb25cf852fb9c4a6d0f38f4.tar.bz2
Silence 64bit compiler warnings using proper casts
Diffstat (limited to 'src')
-rw-r--r--src/idevice.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/idevice.c b/src/idevice.c
index 4917b42..c86b806 100644
--- a/src/idevice.c
+++ b/src/idevice.c
@@ -162,7 +162,7 @@ idevice_error_t idevice_new(idevice_t * device, const char *uuid)
idevice_t phone = (idevice_t) malloc(sizeof(struct idevice_private));
phone->uuid = strdup(muxdev.uuid);
phone->conn_type = CONNECTION_USBMUXD;
- phone->conn_data = (void*)muxdev.handle;
+ phone->conn_data = (void*)(long)muxdev.handle;
*device = phone;
return IDEVICE_E_SUCCESS;
}
@@ -215,14 +215,14 @@ idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connect
}
if (device->conn_type == CONNECTION_USBMUXD) {
- int sfd = usbmuxd_connect((uint32_t)(device->conn_data), port);
+ int sfd = usbmuxd_connect((uint32_t)(long)device->conn_data, port);
if (sfd < 0) {
debug_info("ERROR: Connecting to usbmuxd failed: %d (%s)", sfd, strerror(-sfd));
return IDEVICE_E_UNKNOWN_ERROR;
}
idevice_connection_t new_connection = (idevice_connection_t)malloc(sizeof(struct idevice_connection_private));
new_connection->type = CONNECTION_USBMUXD;
- new_connection->data = (void*)sfd;
+ new_connection->data = (void*)(long)sfd;
new_connection->ssl_data = NULL;
*connection = new_connection;
return IDEVICE_E_SUCCESS;
@@ -251,7 +251,7 @@ idevice_error_t idevice_disconnect(idevice_connection_t connection)
}
idevice_error_t result = IDEVICE_E_UNKNOWN_ERROR;
if (connection->type == CONNECTION_USBMUXD) {
- usbmuxd_disconnect((int)(connection->data));
+ usbmuxd_disconnect((int)(long)connection->data);
result = IDEVICE_E_SUCCESS;
} else {
debug_info("Unknown connection type %d", connection->type);
@@ -270,7 +270,7 @@ static idevice_error_t internal_connection_send(idevice_connection_t connection,
}
if (connection->type == CONNECTION_USBMUXD) {
- int res = usbmuxd_send((int)(connection->data), data, len, sent_bytes);
+ int res = usbmuxd_send((int)(long)connection->data, data, len, sent_bytes);
if (res < 0) {
debug_info("ERROR: usbmuxd_send returned %d (%s)", res, strerror(-res));
return IDEVICE_E_UNKNOWN_ERROR;
@@ -323,7 +323,7 @@ static idevice_error_t internal_connection_receive_timeout(idevice_connection_t
}
if (connection->type == CONNECTION_USBMUXD) {
- int res = usbmuxd_recv_timeout((int)(connection->data), data, len, recv_bytes, timeout);
+ int res = usbmuxd_recv_timeout((int)(long)connection->data, data, len, recv_bytes, timeout);
if (res < 0) {
debug_info("ERROR: usbmuxd_recv_timeout returned %d (%s)", res, strerror(-res));
return IDEVICE_E_UNKNOWN_ERROR;
@@ -378,7 +378,7 @@ static idevice_error_t internal_connection_receive(idevice_connection_t connecti
}
if (connection->type == CONNECTION_USBMUXD) {
- int res = usbmuxd_recv((int)(connection->data), data, len, recv_bytes);
+ int res = usbmuxd_recv((int)(long)connection->data, data, len, recv_bytes);
if (res < 0) {
debug_info("ERROR: usbmuxd_recv returned %d (%s)", res, strerror(-res));
return IDEVICE_E_UNKNOWN_ERROR;
@@ -431,7 +431,7 @@ idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle)
return IDEVICE_E_INVALID_ARG;
if (device->conn_type == CONNECTION_USBMUXD) {
- *handle = (uint32_t)device->conn_data;
+ *handle = (uint32_t)(long)device->conn_data;
return IDEVICE_E_SUCCESS;
} else {
debug_info("Unknown connection type %d", device->conn_type);