From babec330acced3915332fa9a09b8252cfa99cf34 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Thu, 21 Jan 2010 21:19:41 +0100 Subject: Fix some warnings --- src/bplist.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/bplist.c') 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) static uint32_t uint24_from_be(char *buff) { uint32_t ret = 0; - char *tmp = (char *) &ret; + uint8_t *tmp = (uint8_t *) &ret; memcpy(tmp + 1, buff, 3 * sizeof(char)); byte_convert(tmp, sizeof(uint32_t)); return ret; @@ -192,7 +192,6 @@ static plist_t parse_unicode_node(char *bnode, uint64_t size) uint64_t i = 0; gunichar2 *unicodestr = NULL; gchar *tmpstr = NULL; - int type = 0; glong items_read = 0; glong items_written = 0; GError *error = NULL; @@ -858,7 +857,7 @@ void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length) case PLIST_KEY: case PLIST_STRING: len = strlen(data->strval); - type = xmlDetectCharEncoding(data->strval, len); + type = xmlDetectCharEncoding((const unsigned char *)data->strval, len); if (XML_CHAR_ENCODING_UTF8 == type) { unicodestr = g_utf8_to_utf16(data->strval, len, &items_read, &items_written, &error); -- cgit v1.1-32-gdbae