GNOME Bugzilla – Bug 172086
building libxml2 2.6.18 on Solaris
Last modified: 2006-10-15 21:42:27 UTC
Hi, I've just built libxml2 2.6.18 on Solaris with the Sun ONE Studio 7 compiler. It builds fine as usual, except for a few minor warnings you may want fo fix: "xpath.c", line 2834: warning: argument #4 is incompatible with prototype: prototype: pointer to void : "./include/libxml/hash.h", line 128 argument : pointer to function(pointer to struct _xmlXPathParserContext {pointer to const unsigned char cur, pointer to const unsigned char base, int error, pointer to struct _xmlXPathContext {..} context, pointer to struct _xmlXPathObject {..} value, int valueNr, int valueMax, pointer to pointer to struct _xmlXPathObject {..} valueTab, pointer to struct _xmlXPathCompExpr {..} comp, int xptr, pointer to struct _xmlNode {..} ancestor}, int) returning void "xpath.c", line 2915: warning: assignment type mismatch: pointer to function(pointer to struct _xmlXPathParserContext {pointer to const unsigned char cur, pointer to const unsigned char base, int error, pointer to struct _xmlXPathContext {..} context, pointer to struct _xmlXPathObject {..} value, int valueNr, int valueMax, pointer to pointer to struct _xmlXPathObject {..} valueTab, pointer to struct _xmlXPathCompExpr {..} comp, int xptr, pointer to struct _xmlNode {..} ancestor}, int) returning void "=" pointer to void "xpath.c", line 10434: warning: assignment type mismatch: pointer to function(pointer to struct _xmlXPathParserContext {pointer to const unsigned char cur, pointer to const unsigned char base, int error, pointer to struct _xmlXPathContext {..} context, pointer to struct _xmlXPathObject {..} value, int valueNr, int valueMax, pointer to pointer to struct _xmlXPathObject {..} valueTab, pointer to struct _xmlXPathCompExpr {..} comp, int xptr, pointer to struct _xmlNode {..} ancestor}, int) returning void "=" pointer to void "xpath.c", line 10459: warning: assignment type mismatch: pointer to void "=" pointer to function(pointer to struct _xmlXPathParserContext {pointer to const unsigned char cur, pointer to const unsigned char base, int error, pointer to struct _xmlXPathContext {..} context, pointer to struct _xmlXPathObject {..} value, int valueNr, int valueMax, pointer to pointer to struct _xmlXPathObject {..} valueTab, pointer to struct _xmlXPathCompExpr {..} comp, int xptr, pointer to struct _xmlNode {..} ancestor}, int) returning void "xpath.c", line 11023: warning: loop not entered at top "xmlschemastypes.c", line 3193: warning: statement not reached "xmlschemastypes.c", line 4820: warning: statement not reached "pattern.c", line 1085: warning: statement not reached
The 4 pointer cast on xpath.c are know, they are back because working around them broke gcc4 on s390, don't expect an immediate fix. For pattern.c found it, fixed on my local copy. For xmlschemastypes.c I could not make sense of the line numbers as code has changed since, testing the cvs snapshot would allow to get updated informations. thanks, Daniel
Here are the relevant lines of xmlschemastypes.c: 3137: xmlSchemaValPtr 3138: xmlSchemaCopyValue(xmlSchemaValPtr val) 3139: { 3140: xmlSchemaValPtr ret; [...] 3192: } 3193: return (NULL); 3194: } 4788: int 4789: xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue) 4790: { [...] 4819: } 4820: return (-1); 4821: }
xmlSchemaGetCanonValue() doesn't finish that way anymore xmlSchemaCopyValue() the extra return is a safety net, I don't think changing it will improve the code actually, especially considering the large number of changes in that module. thank, Daniel