diff options
author | rbuj <[email protected]> | 2021-02-21 10:30:00 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-07-21 19:33:50 +0200 |
commit | 202a9c5ad39758616f73e23aabcbe43aaebea26b (patch) | |
tree | 402b5a9a629f3148c44dab9950f5af8bed066892 /libcaja-private | |
parent | 76f11ad9fd2c4a46211a115fe16c71dca9756503 (diff) | |
download | caja-202a9c5ad39758616f73e23aabcbe43aaebea26b.tar.bz2 caja-202a9c5ad39758616f73e23aabcbe43aaebea26b.tar.xz |
Fix warnings about xmlChar cast
Diffstat (limited to 'libcaja-private')
-rw-r--r-- | libcaja-private/caja-customization-data.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libcaja-private/caja-customization-data.c b/libcaja-private/caja-customization-data.c index d1f2a180..8caecba6 100644 --- a/libcaja-private/caja-customization-data.c +++ b/libcaja-private/caja-customization-data.c @@ -469,19 +469,24 @@ load_name_map_hash_table (CajaCustomizationData *data) if ((browser_data = xmlParseFile (CAJA_DATADIR "/browser.xml")) != NULL) { /* get the category node */ - category_node = eel_xml_get_root_child_by_name_and_property (browser_data, "category", "name", data->customization_name); + category_node = eel_xml_get_root_child_by_name_and_property (browser_data, + (const xmlChar *) "category", + (const xmlChar *) "name", + (const xmlChar *) data->customization_name); current_node = category_node->children; /* loop through the entries, adding a mapping to the hash table */ while (current_node != NULL) { - char *filename, *display_name; + xmlChar *filename, *display_name; - display_name = xmlGetProp (current_node, "display_name"); - filename = xmlGetProp (current_node, "filename"); + display_name = xmlGetProp (current_node, (const xmlChar *) "display_name"); + filename = xmlGetProp (current_node, (const xmlChar *) "filename"); if (display_name && filename) { - g_hash_table_insert (data->name_map_hash, g_strdup (filename), g_strdup (_(display_name))); + g_hash_table_replace (data->name_map_hash, + g_strdup ((const char *) filename), + g_strdup (_((const char *) display_name))); } xmlFree (filename); xmlFree (display_name); |