From e29aef80350b5ee4bf989443acf553f5f295df4c Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 10 Dec 2019 20:42:15 -0800 Subject: Fix format compiler warnings This also allows the compiler to check these at compile time. --- src/common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/common.c') 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 #endif +#include #include #include #include @@ -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); } -- cgit v1.1-32-gdbae