[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[xml] Compilation errors for rngparser.c
- From: Philip Ludlam <nospam philipnet com>
- To: xml gnome org
- Subject: [xml] Compilation errors for rngparser.c
- Date: Fri, 06 Feb 2004 23:21:17 GMT
Dear All,
When compiling rngparser.c (libxml2-2.6.5) I get the following errors:
1)
"rngparser.c", line 1441: Error: <function argument 1>: implicit cast of pointer to non-equal pointer
"rngparser.c", line 1445: Error: '=': implicit cast of pointer to non-equal pointer
"rngparser.c", line 1446: Error: '=': implicit cast of pointer to non-equal pointer
"rngparser.c", line 1447: Error: '=': implicit cast of pointer to non-equal pointer
Casting to (const unsigned char *) stops the compiler from generating
the above errors (char defaults to signed here and I guess that's what
causing the problem). Patch attached.
5)
"rngparser.c", line 1494: Error: undeclared name, inventing 'extern int xmlConvertCRNG_topLevel()'
6)
"rngparser.c", line 1513: Error: type disagreement for 'xmlConvertCRNG'
"rngparser.c", line 1513: Serious error: duplicate definition of 'xmlConvertCRNG'
My text editor tells me that xmlConvertCRNG is defined twice:
xmlConvertCRNG(const char *schemas, int len, const char *encoding) {
(line 1436)
xmlConvertCRNG(const char *URL, const char *encoding) {
(line 1513)
In case it matters I don't use autoconf and the like here to build
libxml2.
Yours,
Phil L.
--
http://www.philipnet.com | http://director.sourceforge.net
Index: rngparser.c
===================================================================
RCS file: /cvs/gnome/libxml2/rngparser.c,v
retrieving revision 1.2
diff -u -r1.2 rngparser.c
--- rngparser.c 25 Jan 2004 19:54:58 -0000 1.2
+++ rngparser.c 6 Feb 2004 23:18:29 -0000
@@ -1438,13 +1438,13 @@
xmlDocPtr ret = NULL;
if (schemas == NULL) return(NULL);
- if (len <= 5) len = xmlStrlen(schemas);
+ if (len <= 5) len = xmlStrlen((const unsigned char *) schemas);
if (len <= 0) return(NULL);
memset(&ctxt, 0, sizeof(ctxt));
- ctxt.compact = schemas;
- ctxt.cur = schemas;
- ctxt.end = &schemas[len];
+ ctxt.compact = (const unsigned char *) schemas;
+ ctxt.cur = (const unsigned char *) schemas;
+ ctxt.end = (const unsigned char *) &schemas[len];
ctxt.dict = xmlDictCreate();
if (ctxt.dict == NULL)
return(NULL);
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]