summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/fdr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fdr.c b/src/fdr.c
index b2ea70a..1635c95 100644
--- a/src/fdr.c
+++ b/src/fdr.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <inttypes.h>
#include <libimobiledevice/libimobiledevice.h>
#include "socket.h" /* from libimobiledevice/common */
@@ -154,7 +155,7 @@ int fdr_poll_and_handle_message(fdr_client_t fdr)
}
else if (device_error != IDEVICE_E_SUCCESS) {
if (fdr->connection) {
- error("ERROR: Unable to receive message from FDR %p (%d). %u/%d bytes\n", fdr, device_error, bytes, sizeof(cmd));
+ error("ERROR: Unable to receive message from FDR %p (%d). %u/%u bytes\n", fdr, device_error, bytes, (uint32_t)sizeof(cmd));
}
return -1;
}
@@ -247,7 +248,7 @@ static int fdr_send_plist(fdr_client_t fdr, plist_t data)
device_error = idevice_connection_send(fdr->connection, (char *)&len, sizeof(len), &bytes);
if (device_error != IDEVICE_E_SUCCESS || bytes != sizeof(len)) {
error("ERROR: FDR unable to send data length. (%d) Sent %u of %u bytes.\n",
- device_error, bytes, sizeof(len));
+ device_error, bytes, (uint32_t)sizeof(len));
free(buf);
return -1;
}
@@ -340,7 +341,7 @@ static int fdr_ctrl_handshake(fdr_client_t fdr)
conn_port = le16toh(cport);
}
- debug("Ctrl handshake done (ConnPort = %u)\n", conn_port);
+ debug("Ctrl handshake done (ConnPort = %" PRIu64 ")\n", (unsigned long long)conn_port);
return 0;
}
@@ -514,7 +515,7 @@ static int fdr_handle_proxy_cmd(fdr_client_t fdr)
if (device_error != IDEVICE_E_SUCCESS || sent != sizeof(ack)) {
free(buf);
error("ERROR: FDR %p unable to send ack. Sent %u of %u bytes.\n",
- fdr, sent, sizeof(ack));
+ fdr, sent, (uint32_t)sizeof(ack));
return -1;
}