diff options
author | Nikias Bassen | 2020-04-13 01:16:37 +0200 |
---|---|---|
committer | Nikias Bassen | 2020-04-13 01:16:37 +0200 |
commit | 2398d20c63134a51b173001f303cd7dec278f6bd (patch) | |
tree | e61fa11b86973dab2de1ed46fee5568cb6c98977 | |
parent | 9243fbbb1d0a7c9912c7e41af4e55d3098b18ddd (diff) | |
download | idevicerestore-2398d20c63134a51b173001f303cd7dec278f6bd.tar.gz idevicerestore-2398d20c63134a51b173001f303cd7dec278f6bd.tar.bz2 |
fdr: Fix format string compiler warnings
-rw-r--r-- | src/fdr.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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; } |