aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-xml-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2007-06-03 09:57:58 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-06-03 09:57:58 +0800
commit187e0c0464e1db79762e2c80b0301eccb3312bad (patch)
treea789e769cd50cc69df585240499f81824a51b012 /e-util/e-xml-utils.c
parent37f9a97269207250d8a1f664aa6a1f4d1e810a59 (diff)
downloadgsoc2013-evolution-187e0c0464e1db79762e2c80b0301eccb3312bad.tar
gsoc2013-evolution-187e0c0464e1db79762e2c80b0301eccb3312bad.tar.gz
gsoc2013-evolution-187e0c0464e1db79762e2c80b0301eccb3312bad.tar.bz2
gsoc2013-evolution-187e0c0464e1db79762e2c80b0301eccb3312bad.tar.lz
gsoc2013-evolution-187e0c0464e1db79762e2c80b0301eccb3312bad.tar.xz
gsoc2013-evolution-187e0c0464e1db79762e2c80b0301eccb3312bad.tar.zst
gsoc2013-evolution-187e0c0464e1db79762e2c80b0301eccb3312bad.zip
Clean up compiler warnings in e-util directory (#438467).
svn path=/trunk/; revision=33623
Diffstat (limited to 'e-util/e-xml-utils.c')
-rw-r--r--e-util/e-xml-utils.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
index 7f9f1870c8..08f3043d20 100644
--- a/e-util/e-xml-utils.c
+++ b/e-util/e-xml-utils.c
@@ -76,10 +76,10 @@ e_xml_get_child_by_name_by_lang (const xmlNode *parent,
}
for (child = parent->xmlChildrenNode; child != NULL; child = child->next) {
if (xmlStrcmp (child->name, child_name) == 0) {
- xmlChar *this_lang = xmlGetProp (child, "lang");
+ xmlChar *this_lang = xmlGetProp (child, (const unsigned char *)"lang");
if (this_lang == NULL) {
C = child;
- } else if (xmlStrcmp(this_lang, lang) == 0) {
+ } else if (xmlStrcmp(this_lang, (xmlChar *)lang) == 0) {
#ifdef G_OS_WIN32
g_free (freeme);
#endif
@@ -104,10 +104,10 @@ e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent,
for (node = parent->xmlChildrenNode; node != NULL; node = node->next) {
xmlChar *lang;
- if (node->name == NULL || strcmp (node->name, name) != 0) {
+ if (node->name == NULL || strcmp ((char *)node->name, name) != 0) {
continue;
}
- lang = xmlGetProp (node, "xml:lang");
+ lang = xmlGetProp (node, (const unsigned char *)"xml:lang");
if (lang != NULL) {
const GList *l;
gint i;
@@ -115,7 +115,7 @@ e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent,
for (l = lang_list, i = 0;
l != NULL && i < *best_lang_score;
l = l->next, i++) {
- if (strcmp ((gchar *) l->data, lang) == 0) {
+ if (strcmp ((char *) l->data, (char *)lang) == 0) {
best_node = node;
*best_lang_score = i;
}
@@ -154,7 +154,7 @@ e_xml_get_child_by_name_by_lang_list (const xmlNode *parent,
language_names = g_get_language_names ();
while (*language_names != NULL)
lang_list = g_list_append (
- lang_list, *language_names++);
+ (GList *)lang_list, (char *)*language_names++);
}
return e_xml_get_child_by_name_by_lang_list_with_score
(parent,name,
@@ -177,10 +177,10 @@ e_xml_get_child_by_name_no_lang (const xmlNode *parent, const gchar *name)
for (node = parent->xmlChildrenNode; node != NULL; node = node->next) {
xmlChar *lang;
- if (node->name == NULL || strcmp (node->name, name) != 0) {
+ if (node->name == NULL || strcmp ((char *)node->name, name) != 0) {
continue;
}
- lang = xmlGetProp (node, "xml:lang");
+ lang = xmlGetProp (node, (const unsigned char *)"xml:lang");
if (lang == NULL) {
return node;
}
@@ -212,7 +212,7 @@ e_xml_get_integer_prop_by_name_with_default (const xmlNode *parent,
prop = xmlGetProp ((xmlNode *) parent, prop_name);
if (prop != NULL) {
- (void) sscanf (prop, "%d", &ret_val);
+ (void) sscanf ((char *)prop, "%d", &ret_val);
xmlFree (prop);
}
return ret_val;
@@ -229,7 +229,7 @@ e_xml_set_integer_prop_by_name (xmlNode *parent,
g_return_if_fail (prop_name != NULL);
valuestr = g_strdup_printf ("%d", value);
- xmlSetProp (parent, prop_name, valuestr);
+ xmlSetProp (parent, prop_name, (unsigned char *)valuestr);
g_free (valuestr);
}
@@ -255,7 +255,7 @@ e_xml_get_uint_prop_by_name_with_default (const xmlNode *parent,
prop = xmlGetProp ((xmlNode *) parent, prop_name);
if (prop != NULL) {
- (void) sscanf (prop, "%u", &ret_val);
+ (void) sscanf ((char *)prop, "%u", &ret_val);
xmlFree (prop);
}
return ret_val;
@@ -272,7 +272,7 @@ e_xml_set_uint_prop_by_name (xmlNode *parent,
g_return_if_fail (prop_name != NULL);
valuestr = g_strdup_printf ("%u", value);
- xmlSetProp (parent, prop_name, valuestr);
+ xmlSetProp (parent, prop_name, (unsigned char *)valuestr);
g_free (valuestr);
}
@@ -301,9 +301,9 @@ e_xml_get_bool_prop_by_name_with_default(const xmlNode *parent,
prop = xmlGetProp ((xmlNode *) parent, prop_name);
if (prop != NULL) {
- if (g_ascii_strcasecmp (prop, "true") == 0) {
+ if (g_ascii_strcasecmp ((char *)prop, "true") == 0) {
ret_val = TRUE;
- } else if (g_ascii_strcasecmp (prop, "false") == 0) {
+ } else if (g_ascii_strcasecmp ((char *)prop, "false") == 0) {
ret_val = FALSE;
}
xmlFree(prop);
@@ -318,9 +318,9 @@ e_xml_set_bool_prop_by_name (xmlNode *parent, const xmlChar *prop_name, gboolean
g_return_if_fail (prop_name != NULL);
if (value) {
- xmlSetProp (parent, prop_name, "true");
+ xmlSetProp (parent, prop_name, (const unsigned char *)"true");
} else {
- xmlSetProp (parent, prop_name, "false");
+ xmlSetProp (parent, prop_name, (const unsigned char *)"false");
}
}
@@ -344,7 +344,7 @@ e_xml_get_double_prop_by_name_with_default (const xmlNode *parent, const xmlChar
prop = xmlGetProp ((xmlNode *) parent, prop_name);
if (prop != NULL) {
- ret_val = e_flexible_strtod (prop, NULL);
+ ret_val = e_flexible_strtod ((char *)prop, NULL);
xmlFree (prop);
}
return ret_val;
@@ -367,7 +367,7 @@ e_xml_set_double_prop_by_name(xmlNode *parent, const xmlChar *prop_name, gdouble
e_ascii_dtostr (buffer, sizeof (buffer), format, value);
g_free (format);
- xmlSetProp (parent, prop_name, buffer);
+ xmlSetProp (parent, prop_name, (const unsigned char *)buffer);
}
gchar *
@@ -390,7 +390,7 @@ e_xml_get_string_prop_by_name_with_default (const xmlNode *parent, const xmlChar
prop = xmlGetProp ((xmlNode *) parent, prop_name);
if (prop != NULL) {
- ret_val = g_strdup (prop);
+ ret_val = g_strdup ((char *)prop);
xmlFree (prop);
} else {
ret_val = g_strdup (def);
@@ -405,7 +405,7 @@ e_xml_set_string_prop_by_name (xmlNode *parent, const xmlChar *prop_name, const
g_return_if_fail (prop_name != NULL);
if (value != NULL) {
- xmlSetProp (parent, prop_name, value);
+ xmlSetProp (parent, prop_name, (unsigned char *)value);
}
}
@@ -421,15 +421,15 @@ e_xml_get_translated_string_prop_by_name (const xmlNode *parent, const xmlChar *
prop = xmlGetProp ((xmlNode *) parent, prop_name);
if (prop != NULL) {
- ret_val = g_strdup (prop);
+ ret_val = g_strdup ((char *)prop);
xmlFree (prop);
return ret_val;
}
combined_name = g_strdup_printf("_%s", prop_name);
- prop = xmlGetProp ((xmlNode *) parent, combined_name);
+ prop = xmlGetProp ((xmlNode *) parent, (unsigned char *)combined_name);
if (prop != NULL) {
- ret_val = g_strdup (gettext(prop));
+ ret_val = g_strdup (gettext((char *)prop));
xmlFree (prop);
}
g_free(combined_name);