summaryrefslogtreecommitdiffstats
path: root/src/iphone.c
diff options
context:
space:
mode:
authorGravatar Christophe Fergeau2008-08-10 23:36:33 +0200
committerGravatar Matt Colyer2008-08-11 09:39:06 -0700
commiteea922593e61a71d3f231578f1e8c4c7f035ec9c (patch)
tree823d5ae4e53be4b83377ab205b1aed94fe06c021 /src/iphone.c
parent323459826aeea8b88872e14af9839a0912a80503 (diff)
downloadlibimobiledevice-eea922593e61a71d3f231578f1e8c4c7f035ec9c.tar.gz
libimobiledevice-eea922593e61a71d3f231578f1e8c4c7f035ec9c.tar.bz2
Fix compilation with gcc 4.3 -Wall -Werror -Wno-pointer-sign
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'src/iphone.c')
-rw-r--r--src/iphone.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/iphone.c b/src/iphone.c
index 426b629..558dd9a 100644
--- a/src/iphone.c
+++ b/src/iphone.c
@@ -21,6 +21,7 @@
21 21
22#include "usbmux.h" 22#include "usbmux.h"
23#include "iphone.h" 23#include "iphone.h"
24#include <arpa/inet.h>
24#include <usb.h> 25#include <usb.h>
25#include <stdio.h> 26#include <stdio.h>
26#include <stdlib.h> 27#include <stdlib.h>
@@ -141,13 +142,13 @@ int send_to_phone(iPhone *phone, char *data, int datalen) {
141 if (!phone) return -1; 142 if (!phone) return -1;
142 int bytes = 0; 143 int bytes = 0;
143 // it may die here 144 // it may die here
144 if (debug) printf("dying here?\ndatalen = %i\ndata = %x\n", datalen, data); 145 if (debug) printf("dying here?\ndatalen = %i\ndata = %p\n", datalen, data);
145 146
146 bytes = usb_bulk_write(phone->device, BULKOUT, data, datalen, 800); 147 bytes = usb_bulk_write(phone->device, BULKOUT, data, datalen, 800);
147 if (debug) printf("noooo...?\n"); 148 if (debug) printf("noooo...?\n");
148 if (bytes < datalen) { 149 if (bytes < datalen) {
149 if(debug && bytes < 0) 150 if(debug && bytes < 0)
150 printf("send_to_iphone(): libusb gave me the error %d: %s\n", bytes, usb_strerror(), strerror(-bytes)); 151 printf("send_to_iphone(): libusb gave me the error %d: %s - %s\n", bytes, usb_strerror(), strerror(-bytes));
151 return -1; 152 return -1;
152 } else { 153 } else {
153 return bytes; 154 return bytes;