summaryrefslogtreecommitdiffstats
path: root/src/common.c
diff options
context:
space:
mode:
authorGravatar Rosen Penev2019-12-10 20:42:15 -0800
committerGravatar Rosen Penev2020-04-12 16:05:01 -0700
commite29aef80350b5ee4bf989443acf553f5f295df4c (patch)
tree6db009f260e563a1c10ab79e89b32739a5f0a1dc /src/common.c
parentfc456a2fa763165453a6a46bbcd030d348b0820b (diff)
downloadidevicerestore-e29aef80350b5ee4bf989443acf553f5f295df4c.tar.gz
idevicerestore-e29aef80350b5ee4bf989443acf553f5f295df4c.tar.bz2
Fix format compiler warnings
This also allows the compiler to check these at compile time.
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c
index cc275f0..325ea2d 100644
--- a/src/common.c
+++ b/src/common.c
@@ -25,6 +25,7 @@
#include <config.h>
#endif
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -589,7 +590,7 @@ uint64_t _plist_dict_get_uint(plist_t dict, const char *key)
} else if (strsz == 1) {
uintval = strval[0];
} else {
- error("%s: ERROR: invalid size %d for data to integer conversion\n", __func__, strsz);
+ error("%s: ERROR: invalid size %" PRIu64 " for data to integer conversion\n", __func__, strsz);
}
free(strval);
}
@@ -635,7 +636,7 @@ uint8_t _plist_dict_get_bool(plist_t dict, const char *key)
if (strsz == 1) {
bval = strval[0];
} else {
- error("%s: ERROR: invalid size %d for data to boolean conversion\n", __func__, strsz);
+ error("%s: ERROR: invalid size %" PRIu64 " for data to boolean conversion\n", __func__, strsz);
}
free(strval);
}