summaryrefslogtreecommitdiffstats
path: root/src/bplist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bplist.c')
-rw-r--r--src/bplist.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bplist.c b/src/bplist.c
index d37ed7a..a9e2638 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -82,7 +82,7 @@ static void byte_convert(uint8_t * address, size_t size)
82static uint32_t uint24_from_be(char *buff) 82static uint32_t uint24_from_be(char *buff)
83{ 83{
84 uint32_t ret = 0; 84 uint32_t ret = 0;
85 char *tmp = (char *) &ret; 85 uint8_t *tmp = (uint8_t *) &ret;
86 memcpy(tmp + 1, buff, 3 * sizeof(char)); 86 memcpy(tmp + 1, buff, 3 * sizeof(char));
87 byte_convert(tmp, sizeof(uint32_t)); 87 byte_convert(tmp, sizeof(uint32_t));
88 return ret; 88 return ret;
@@ -192,7 +192,6 @@ static plist_t parse_unicode_node(char *bnode, uint64_t size)
192 uint64_t i = 0; 192 uint64_t i = 0;
193 gunichar2 *unicodestr = NULL; 193 gunichar2 *unicodestr = NULL;
194 gchar *tmpstr = NULL; 194 gchar *tmpstr = NULL;
195 int type = 0;
196 glong items_read = 0; 195 glong items_read = 0;
197 glong items_written = 0; 196 glong items_written = 0;
198 GError *error = NULL; 197 GError *error = NULL;
@@ -858,7 +857,7 @@ void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length)
858 case PLIST_KEY: 857 case PLIST_KEY:
859 case PLIST_STRING: 858 case PLIST_STRING:
860 len = strlen(data->strval); 859 len = strlen(data->strval);
861 type = xmlDetectCharEncoding(data->strval, len); 860 type = xmlDetectCharEncoding((const unsigned char *)data->strval, len);
862 if (XML_CHAR_ENCODING_UTF8 == type) 861 if (XML_CHAR_ENCODING_UTF8 == type)
863 { 862 {
864 unicodestr = g_utf8_to_utf16(data->strval, len, &items_read, &items_written, &error); 863 unicodestr = g_utf8_to_utf16(data->strval, len, &items_read, &items_written, &error);