diff options
author | rbuj <[email protected]> | 2021-02-21 10:30:00 +0100 |
---|---|---|
committer | Luke from DC <[email protected]> | 2021-02-25 04:07:11 +0000 |
commit | 61ab4b0088628429259810780a7d9360863fe3df (patch) | |
tree | 378187421ebc50706ff8b7fab1494896f5e9e0cb /libcaja-private/caja-customization-data.c | |
parent | 8ffff0ec396a40caa9251ac78597ff70ae1df4d1 (diff) | |
download | caja-61ab4b0088628429259810780a7d9360863fe3df.tar.bz2 caja-61ab4b0088628429259810780a7d9360863fe3df.tar.xz |
Fix warnings about xmlChar cast
Diffstat (limited to 'libcaja-private/caja-customization-data.c')
-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 bbd9a386..0a0d540c 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); |