[evolution-patches] This patch removes some compiler warnings (on gcc 4.0)



Mainly (xmlChar*) casting for libxml  . . .


-- 
Philip Van Hoof, Software Developer @ Cronos
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: philip dot vanhoof at cronos dot be
junk: philip dot vanhoof at gmail dot com
http://www.pvanhoof.be/
Index: e-pub-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-pub-utils.c,v
retrieving revision 1.7
diff -u -r1.7 e-pub-utils.c
--- e-pub-utils.c	23 Feb 2005 18:56:56 -0000	1.7
+++ e-pub-utils.c	2 May 2005 19:33:43 -0000
@@ -44,39 +44,39 @@
 	GSList *l = NULL;
 	
 	uri->location = NULL;
-	doc = xmlParseDoc ((char *)xml);
+	doc = xmlParseDoc ((xmlChar *)xml);
 	if (doc == NULL) {
 		uri->location = NULL;
 		return;
 	}
 	
 	root = doc->children;
-	if (strcmp (root->name, "uri") != 0) {
+	if (strcmp ((const char*)root->name, "uri") != 0) {
 		return;
 	}
-	location = xmlGetProp (root, "location");
-	enabled = xmlGetProp (root, "enabled");
-	frequency = xmlGetProp (root, "frequency");
-	username = xmlGetProp (root, "username");
-	publish_time = xmlGetProp (root, "publish_time");
+	location = xmlGetProp (root, (xmlChar*)"location");
+	enabled = xmlGetProp (root, (xmlChar*)"enabled");
+	frequency = xmlGetProp (root, (xmlChar*)"frequency");
+	username = xmlGetProp (root, (xmlChar*)"username");
+	publish_time = xmlGetProp (root, (xmlChar*)"publish_time");
 	
 	if (location != NULL)
-		uri->location = g_strdup (location);
+		uri->location = g_strdup ((const gchar*)location);
 	if (enabled != NULL)
-		uri->enabled = atoi (enabled);
+		uri->enabled = atoi ((const char*)enabled);
 	if (frequency != NULL)
-		uri->publish_freq = atoi (frequency);
+		uri->publish_freq = atoi ((const char*)frequency);
 	if (username != NULL)
-		uri->username = g_strdup (username);
+		uri->username = g_strdup ((const gchar*)username);
 	if (publish_time != NULL)
-		uri->last_pub_time = g_strdup (publish_time);
+		uri->last_pub_time = g_strdup ((const gchar*)publish_time);
 	
 	uri->password = g_strdup ("");
 
 	for (p = root->children; p != NULL; p = p->next) {
-		xmlChar *uid = xmlGetProp (p, "uid");
+		xmlChar *uid = xmlGetProp (p, (xmlChar*)"uid");
 
-		l = g_slist_append (l, uid);
+		l = g_slist_append (l, (xmlChar*)uid);
 	}	
 	uri->calendars = l;
 	
@@ -100,22 +100,22 @@
 	g_return_val_if_fail (uri != NULL, NULL);
 	g_return_val_if_fail (uri->location != NULL, NULL);
 
-	doc = xmlNewDoc ("1.0");
+	doc = xmlNewDoc ((xmlChar*)"1.0");
 
-	root = xmlNewDocNode (doc, NULL, "uri", NULL);
+	root = xmlNewDocNode (doc, NULL, (xmlChar*)"uri", NULL);
 	enabled = g_strdup_printf ("%d", uri->enabled);
 	frequency = g_strdup_printf ("%d", uri->publish_freq);
-	xmlSetProp (root, "location", uri->location);
-	xmlSetProp (root, "enabled", enabled);
-	xmlSetProp (root, "frequency", frequency);
-	xmlSetProp (root, "username", uri->username);
-	xmlSetProp (root, "publish_time", uri->last_pub_time);
+	xmlSetProp (root, (xmlChar*)"location", (xmlChar*)uri->location);
+	xmlSetProp (root, (xmlChar*)"enabled", (xmlChar*)enabled);
+	xmlSetProp (root, (xmlChar*)"frequency", (xmlChar*)frequency);
+	xmlSetProp (root, (xmlChar*)"username", (xmlChar*)uri->username);
+	xmlSetProp (root, (xmlChar*)"publish_time", (xmlChar*)uri->last_pub_time);
 	
 	for (cals = uri->calendars; cals != NULL; cals = cals->next) {
 		xmlNodePtr node;
 		
-		node = xmlNewChild (root, NULL, "source", NULL);
-		xmlSetProp (node, "uid", cals->data);
+		node = xmlNewChild (root, NULL, (xmlChar*)"source", NULL);
+		xmlSetProp (node, (xmlChar*)"uid", cals->data);
 	}
 	xmlDocSetRootElement (doc, root);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]