aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-08-05 09:14:23 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-08-05 09:14:23 +0100
commit7ece26f7f86c099d0e483a749dbe77db73b2cb9c (patch)
tree099761245db363e2edf848836272f400352dea2b
parent8811b6fceb38fc379dfc0877fdffe5493d0ff8b1 (diff)
downloadpack-7ece26f7f86c099d0e483a749dbe77db73b2cb9c.tar.gz
pack-7ece26f7f86c099d0e483a749dbe77db73b2cb9c.tar.xz
pack-7ece26f7f86c099d0e483a749dbe77db73b2cb9c.zip
explicitly cast printf %p params to (void *)
-rw-r--r--pack.c2
-rw-r--r--test.c2
-rw-r--r--unpack.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/pack.c b/pack.c
index 55fc224..4dc6c3a 100644
--- a/pack.c
+++ b/pack.c
@@ -25,7 +25,7 @@ enum pack_status pack(void *buf_, size_t size, const char *fmt, ...)
size_t offset = 0;
va_list ap;
- tr_call("pack(%p, %zu, %s, ...)", buf, size, fmt);
+ tr_call("pack(%p, %zu, %s, ...)", (void *)buf, size, fmt);
va_start(ap, fmt);
diff --git a/test.c b/test.c
index 5d4eb7e..b2cff61 100644
--- a/test.c
+++ b/test.c
@@ -39,7 +39,7 @@ struct test {
#define CHECK_PACK(dest, fmt, ...) do { \
enum pack_status CHECK_PACK_s = pack(dest, sizeof (dest), fmt, __VA_ARGS__); \
if (CHECK_PACK_s != PACK_OK) { \
- printf(__FILE__ ":%d pack(%p, %zu, " #fmt ", ...) -> %s (%d)\n", __LINE__, dest, sizeof (dest), pack_strerror(CHECK_PACK_s), CHECK_PACK_s); \
+ printf(__FILE__ ":%d pack(%p, %zu, " #fmt ", ...) -> %s (%d)\n", __LINE__, (void *)(dest), sizeof (dest), pack_strerror(CHECK_PACK_s), CHECK_PACK_s); \
return false; \
} \
} while (0)
diff --git a/unpack.c b/unpack.c
index 732685d..bd58d00 100644
--- a/unpack.c
+++ b/unpack.c
@@ -43,7 +43,7 @@ enum pack_status unpack(const void *buf_, size_t size, const char *fmt, ...)
size_t offset = 0;
va_list ap;
- tr_call("unpack(%p, %zu, %s, ...)", buf, size, fmt);
+ tr_call("unpack(%p, %zu, %s, ...)", (void *)buf, size, fmt);
va_start(ap, fmt);