summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Rosen Penev2020-04-12 21:20:03 -0700
committerGravatar Rosen Penev2020-04-12 21:25:35 -0700
commit10b85ce085e4f2c0d695ee6c92fc26a7c9f456d7 (patch)
treee18af55ed4722a98c9c14c0f150238e6448fbf03
parent05f543df0147c61cb5900586512c882d276d0ed6 (diff)
downloadidevicerestore-10b85ce085e4f2c0d695ee6c92fc26a7c9f456d7.tar.gz
idevicerestore-10b85ce085e4f2c0d695ee6c92fc26a7c9f456d7.tar.bz2
fix newly introduced format errors under 64-bit
uint64_t should be used. Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r--src/common.c1
-rw-r--r--src/common.h3
-rw-r--r--src/fdr.c3
-rw-r--r--src/restore.c3
4 files changed, 4 insertions, 6 deletions
diff --git a/src/common.c b/src/common.c
index a1bfd09..6f113c5 100644
--- a/src/common.c
+++ b/src/common.c
@@ -25,7 +25,6 @@
#include <config.h>
#endif
-#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/common.h b/src/common.h
index af46737..0a6e48c 100644
--- a/src/common.h
+++ b/src/common.h
@@ -32,6 +32,7 @@ extern "C" {
#include <config.h>
#endif
+#include <inttypes.h>
#include <unistd.h>
#include <plist/plist.h>
@@ -146,7 +147,7 @@ char *generate_guid(void);
#include <sys/stat.h>
#define __mkdir(path, mode) mkdir(path, mode)
#define FMT_qu "%qu"
-#define FMT_016llx "%016llx"
+#define FMT_016llx "%016" PRIx64
#define __usleep(x) usleep(x)
#endif
diff --git a/src/fdr.c b/src/fdr.c
index 1635c95..e21d134 100644
--- a/src/fdr.c
+++ b/src/fdr.c
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <inttypes.h>
#include <libimobiledevice/libimobiledevice.h>
#include "socket.h" /* from libimobiledevice/common */
@@ -341,7 +340,7 @@ static int fdr_ctrl_handshake(fdr_client_t fdr)
conn_port = le16toh(cport);
}
- debug("Ctrl handshake done (ConnPort = %" PRIu64 ")\n", (unsigned long long)conn_port);
+ debug("Ctrl handshake done (ConnPort = %" PRIu64 ")\n", (uint64_t)conn_port);
return 0;
}
diff --git a/src/restore.c b/src/restore.c
index 3836f2e..2f72bd4 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -28,7 +28,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <inttypes.h>
#include <libimobiledevice/restore.h>
#include <zip.h>
#include <libirecovery.h>
@@ -1942,7 +1941,7 @@ static plist_t restore_get_se_firmware_data(restored_client_t restore, struct id
} else if (chip_id == 0x73 || chip_id == 0x64 || chip_id == 0xC8) {
comp_name = "SE,UpdatePayload";
} else {
- info("WARNING: Unknown SE,ChipID 0x%" PRIx64 " detected. Restore might fail.\n", (unsigned long long)chip_id);
+ info("WARNING: Unknown SE,ChipID 0x%" PRIx64 " detected. Restore might fail.\n", (uint64_t)chip_id);
if (build_identity_has_component(build_identity, "SE,UpdatePayload"))
comp_name = "SE,UpdatePayload";
else if (build_identity_has_component(build_identity, "SE,Firmware"))