summaryrefslogtreecommitdiffstats
path: root/src/bplist.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2010-01-21 21:19:41 +0100
committerGravatar Jonathan Beck2010-01-21 21:19:41 +0100
commitbabec330acced3915332fa9a09b8252cfa99cf34 (patch)
treee5fdbcde4e3296b55f441012ec8f66b74ef286d1 /src/bplist.c
parent874942ec1600773622238ae28544908d292ef339 (diff)
downloadlibplist-babec330acced3915332fa9a09b8252cfa99cf34.tar.gz
libplist-babec330acced3915332fa9a09b8252cfa99cf34.tar.bz2
Fix some warnings
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)
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);