summaryrefslogtreecommitdiffstats
path: root/src/bplist.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-08-06 01:32:06 +0200
committerGravatar Nikias Bassen2014-08-06 01:32:06 +0200
commit1c0b659b92c1f5de50af79cbd85713851a3fa975 (patch)
treeb45e7533f379fba786131a4429547bf835c6a815 /src/bplist.c
parentd05dca376917df68fe4e251c3a211cf9ba7eb36f (diff)
downloadlibplist-1c0b659b92c1f5de50af79cbd85713851a3fa975.tar.gz
libplist-1c0b659b92c1f5de50af79cbd85713851a3fa975.tar.bz2
bplist: Silence compiler warning about 'always true' comparison due to type mismatch
Diffstat (limited to 'src/bplist.c')
-rw-r--r--src/bplist.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bplist.c b/src/bplist.c
index c4b2e13..5789f26 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -1115,6 +1115,8 @@ void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length)
1115 long items_read = 0; 1115 long items_read = 0;
1116 long items_written = 0; 1116 long items_written = 0;
1117 uint16_t *unicodestr = NULL; 1117 uint16_t *unicodestr = NULL;
1118 uint64_t objects_len = 0;
1119 uint64_t buff_len = 0;
1118 1120
1119 //check for valid input 1121 //check for valid input
1120 if (!plist || !plist_bin || *plist_bin || !length) 1122 if (!plist || !plist_bin || *plist_bin || !length)
@@ -1132,7 +1134,8 @@ void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length)
1132 1134
1133 //now stream to output buffer 1135 //now stream to output buffer
1134 offset_size = 0; //unknown yet 1136 offset_size = 0; //unknown yet
1135 dict_param_size = get_needed_bytes(objects->len); 1137 objects_len = objects->len;
1138 dict_param_size = get_needed_bytes(objects_len);
1136 num_objects = objects->len; 1139 num_objects = objects->len;
1137 root_object = 0; //root is first in list 1140 root_object = 0; //root is first in list
1138 offset_table_index = 0; //unknown yet 1141 offset_table_index = 0; //unknown yet
@@ -1211,7 +1214,8 @@ void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length)
1211 hash_table_destroy(ref_table); 1214 hash_table_destroy(ref_table);
1212 1215
1213 //write offsets 1216 //write offsets
1214 offset_size = get_needed_bytes(bplist_buff->len); 1217 buff_len = bplist_buff->len;
1218 offset_size = get_needed_bytes(buff_len);
1215 offset_table_index = bplist_buff->len; 1219 offset_table_index = bplist_buff->len;
1216 for (i = 0; i < num_objects; i++) 1220 for (i = 0; i < num_objects; i++)
1217 { 1221 {