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

[xml] XPath.c: Error: '=': qualifier-losing implicit cast of pointer



Dear All,

I get the following error from my compiler when compiling xpath.c:
Error: '=': qualifier-losing implicit cast of pointer
which occurs at the altered lines in the attached patch (here it's lines
570 & 576).

The compiler is quite a stickler for the C standard and I believe that
it doesn't like the assignment of const value to a non-const one (see
S6.7.3).

Yours,

Phil L.
-- 
http://www.philipnet.com | http://director.sourceforge.net
Index: xpath.c
===================================================================
RCS file: /cvs/gnome/libxml2/xpath.c,v
retrieving revision 1.249
diff -u -r1.249 xpath.c
--- xpath.c	30 Jan 2004 07:52:48 -0000	1.249
+++ xpath.c	6 Feb 2004 20:21:47 -0000
@@ -562,13 +562,13 @@
         ((op == XPATH_OP_FUNCTION) || (op == XPATH_OP_VARIABLE) ||
 	 (op == XPATH_OP_COLLECT))) {
         if (value4 != NULL) {
-	    comp->steps[comp->nbStep].value4 = 
+	    comp->steps[comp->nbStep].value4 = (xmlChar *)
 	        (void *)xmlDictLookup(comp->dict, value4, -1);
 	    xmlFree(value4);
 	} else
 	    comp->steps[comp->nbStep].value4 = NULL;
         if (value5 != NULL) {
-	    comp->steps[comp->nbStep].value5 = 
+	    comp->steps[comp->nbStep].value5 = (xmlChar *)
 	        (void *)xmlDictLookup(comp->dict, value5, -1);
 	    xmlFree(value5);
 	} else


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