summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2017-04-20 11:33:54 +0200
committerGravatar Nikias Bassen2017-04-20 11:33:54 +0200
commitaf52f0420a27f88174ad87c6a0f2cfb7cb426ad9 (patch)
tree97dfecd74036f9591446d030693a60bd378fc86e /src
parentd6c437575f30094cce4f0747e45a1f12880ce89b (diff)
downloadlibplist-af52f0420a27f88174ad87c6a0f2cfb7cb426ad9.tar.gz
libplist-af52f0420a27f88174ad87c6a0f2cfb7cb426ad9.tar.bz2
bplist: Suppress compiler warnings with proper casts
Diffstat (limited to 'src')
-rw-r--r--src/bplist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bplist.c b/src/bplist.c
index 8e0dcd1..fe80458 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -183,7 +183,7 @@ union plist_uint_ptr
183#endif 183#endif
184 184
185#if __has_builtin(__builtin_umulll_overflow) || __GNUC__ >= 5 185#if __has_builtin(__builtin_umulll_overflow) || __GNUC__ >= 5
186#define uint64_mul_overflow(a, b, r) __builtin_umulll_overflow(a, b, r) 186#define uint64_mul_overflow(a, b, r) __builtin_umulll_overflow(a, b, (unsigned long long*)r)
187#else 187#else
188static int uint64_mul_overflow(uint64_t a, uint64_t b, uint64_t *res) 188static int uint64_mul_overflow(uint64_t a, uint64_t b, uint64_t *res)
189{ 189{
@@ -575,7 +575,7 @@ static plist_t parse_bin_node(struct bplist_data *bplist, const char** object)
575 uint16_t type = 0; 575 uint16_t type = 0;
576 uint64_t size = 0; 576 uint64_t size = 0;
577 uint64_t pobject = 0; 577 uint64_t pobject = 0;
578 uint64_t poffset_table = (uint64_t)bplist->offset_table; 578 uint64_t poffset_table = (uint64_t)(uintptr_t)bplist->offset_table;
579 579
580 if (!object) 580 if (!object)
581 return NULL; 581 return NULL;
@@ -613,7 +613,7 @@ static plist_t parse_bin_node(struct bplist_data *bplist, const char** object)
613 } 613 }
614 } 614 }
615 615
616 pobject = (uint64_t)*object; 616 pobject = (uint64_t)(uintptr_t)*object;
617 617
618 switch (type) 618 switch (type)
619 { 619 {