diff options
author | Jonathan Beck | 2010-01-21 21:19:41 +0100 |
---|---|---|
committer | Jonathan Beck | 2010-01-21 21:19:41 +0100 |
commit | babec330acced3915332fa9a09b8252cfa99cf34 (patch) | |
tree | e5fdbcde4e3296b55f441012ec8f66b74ef286d1 /src/plist.c | |
parent | 874942ec1600773622238ae28544908d292ef339 (diff) | |
download | libplist-babec330acced3915332fa9a09b8252cfa99cf34.tar.gz libplist-babec330acced3915332fa9a09b8252cfa99cf34.tar.bz2 |
Fix some warnings
Diffstat (limited to 'src/plist.c')
-rw-r--r-- | src/plist.c | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/plist.c b/src/plist.c index 1abd0f9..7028d81 100644 --- a/src/plist.c +++ b/src/plist.c @@ -414,38 +414,6 @@ void plist_dict_remove_item(plist_t node, const char* key) return; } -static char compare_node_value(plist_type type, plist_data_t data, const void *value, uint64_t length) -{ - char res = FALSE; - switch (type) - { - case PLIST_BOOLEAN: - res = data->boolval == *((char *) value) ? TRUE : FALSE; - break; - case PLIST_UINT: - res = data->intval == *((uint64_t *) value) ? TRUE : FALSE; - break; - case PLIST_REAL: - res = data->realval == *((double *) value) ? TRUE : FALSE; - break; - case PLIST_KEY: - case PLIST_STRING: - res = !strcmp(data->strval, ((char *) value)); - break; - case PLIST_DATA: - res = !memcmp(data->buff, (char *) value, length); - break; - case PLIST_DATE: - res = !memcmp(&(data->timeval), value, sizeof(GTimeVal)); - break; - case PLIST_ARRAY: - case PLIST_DICT: - default: - break; - } - return res; -} - plist_t plist_access_pathv(plist_t plist, uint32_t length, va_list v) { plist_t current = plist; @@ -458,8 +426,8 @@ plist_t plist_access_pathv(plist_t plist, uint32_t length, va_list v) if (type == PLIST_ARRAY) { - uint32_t index = va_arg(v, uint32_t); - current = plist_array_get_item(current, index); + uint32_t n = va_arg(v, uint32_t); + current = plist_array_get_item(current, n); } else if (type == PLIST_DICT) { |