mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-08 17:42:14 +03:00
further (final?) minor changes for compilation warnings. No change to
* encoding.c, parser.c, relaxng.c: further (final?) minor changes for compilation warnings. No change to logic.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Sat Sep 27 12:19:38 PDT 2003 William Brack <wbrack@mmm.com.hk>
|
||||||
|
|
||||||
|
* encoding.c, parser.c, relaxng.c: further (final?) minor
|
||||||
|
changes for compilation warnings. No change to logic.
|
||||||
|
|
||||||
Fri Sep 26 18:03:42 PDT 2003 William Brack <wbrack@mmm.com.hk>
|
Fri Sep 26 18:03:42 PDT 2003 William Brack <wbrack@mmm.com.hk>
|
||||||
|
|
||||||
* parser.c: fixed small problem with missing entities (test/ent2)
|
* parser.c: fixed small problem with missing entities (test/ent2)
|
||||||
|
@@ -2475,7 +2475,6 @@ static int
|
|||||||
UTF8ToISO8859x(unsigned char* out, int *outlen,
|
UTF8ToISO8859x(unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, int *inlen,
|
const unsigned char* in, int *inlen,
|
||||||
unsigned char const *xlattable) {
|
unsigned char const *xlattable) {
|
||||||
const unsigned char* outend;
|
|
||||||
const unsigned char* outstart = out;
|
const unsigned char* outstart = out;
|
||||||
const unsigned char* inend;
|
const unsigned char* inend;
|
||||||
const unsigned char* instart = in;
|
const unsigned char* instart = in;
|
||||||
@@ -2489,7 +2488,6 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
inend = in + (*inlen);
|
inend = in + (*inlen);
|
||||||
outend = out + (*outlen);
|
|
||||||
while (in < inend) {
|
while (in < inend) {
|
||||||
unsigned char d = *in++;
|
unsigned char d = *in++;
|
||||||
if (d < 0x80) {
|
if (d < 0x80) {
|
||||||
|
22
parser.c
22
parser.c
@@ -675,8 +675,8 @@ xmlEntityPtr xmlParseStringEntityRef(xmlParserCtxtPtr ctxt,
|
|||||||
*
|
*
|
||||||
* Pushes a new parser namespace on top of the ns stack
|
* Pushes a new parser namespace on top of the ns stack
|
||||||
*
|
*
|
||||||
* Returns -1 in case of error, the index in the stack otherwise,
|
* Returns -1 in case of error, -2 if the namespace should be discarded
|
||||||
* and -2 if the namespace should be discarded.
|
* and the index in the stack otherwise.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
nsPush(xmlParserCtxtPtr ctxt, const xmlChar *prefix, const xmlChar *URL)
|
nsPush(xmlParserCtxtPtr ctxt, const xmlChar *prefix, const xmlChar *URL)
|
||||||
@@ -4371,7 +4371,7 @@ xmlParseDefaultDecl(xmlParserCtxtPtr ctxt, xmlChar **value) {
|
|||||||
ret = xmlParseAttValue(ctxt);
|
ret = xmlParseAttValue(ctxt);
|
||||||
ctxt->instate = XML_PARSER_DTD;
|
ctxt->instate = XML_PARSER_DTD;
|
||||||
if (ret == NULL) {
|
if (ret == NULL) {
|
||||||
xmlFatalErrMsg(ctxt, ctxt->errNo,
|
xmlFatalErrMsg(ctxt, (xmlParserErrors)ctxt->errNo,
|
||||||
"Attribute default value declaration error\n");
|
"Attribute default value declaration error\n");
|
||||||
} else
|
} else
|
||||||
*value = ret;
|
*value = ret;
|
||||||
@@ -10773,7 +10773,7 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
|
|||||||
if (ctxt->errNo == 0)
|
if (ctxt->errNo == 0)
|
||||||
ret = XML_ERR_INTERNAL_ERROR;
|
ret = XML_ERR_INTERNAL_ERROR;
|
||||||
else
|
else
|
||||||
ret = ctxt->errNo;
|
ret = (xmlParserErrors)ctxt->errNo;
|
||||||
} else {
|
} else {
|
||||||
if (list != NULL) {
|
if (list != NULL) {
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
@@ -10901,12 +10901,12 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
|
|||||||
if (lst != NULL)
|
if (lst != NULL)
|
||||||
*lst = NULL;
|
*lst = NULL;
|
||||||
if (string == NULL)
|
if (string == NULL)
|
||||||
return(-1);
|
return(XML_ERR_INTERNAL_ERROR);
|
||||||
|
|
||||||
size = xmlStrlen(string);
|
size = xmlStrlen(string);
|
||||||
|
|
||||||
ctxt = xmlCreateMemoryParserCtxt((char *) string, size);
|
ctxt = xmlCreateMemoryParserCtxt((char *) string, size);
|
||||||
if (ctxt == NULL) return(-1);
|
if (ctxt == NULL) return(XML_WAR_UNDECLARED_ENTITY);
|
||||||
if (user_data != NULL)
|
if (user_data != NULL)
|
||||||
ctxt->userData = user_data;
|
ctxt->userData = user_data;
|
||||||
else
|
else
|
||||||
@@ -10925,7 +10925,7 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
|
|||||||
ctxt->sax = oldsax;
|
ctxt->sax = oldsax;
|
||||||
ctxt->dict = NULL;
|
ctxt->dict = NULL;
|
||||||
xmlFreeParserCtxt(ctxt);
|
xmlFreeParserCtxt(ctxt);
|
||||||
return(-1);
|
return(XML_ERR_INTERNAL_ERROR);
|
||||||
}
|
}
|
||||||
ctxt->myDoc = newDoc;
|
ctxt->myDoc = newDoc;
|
||||||
} else {
|
} else {
|
||||||
@@ -10940,7 +10940,7 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
|
|||||||
xmlFreeParserCtxt(ctxt);
|
xmlFreeParserCtxt(ctxt);
|
||||||
if (newDoc != NULL)
|
if (newDoc != NULL)
|
||||||
xmlFreeDoc(newDoc);
|
xmlFreeDoc(newDoc);
|
||||||
return(-1);
|
return(XML_ERR_INTERNAL_ERROR);
|
||||||
}
|
}
|
||||||
nodePush(ctxt, ctxt->myDoc->children);
|
nodePush(ctxt, ctxt->myDoc->children);
|
||||||
ctxt->instate = XML_PARSER_CONTENT;
|
ctxt->instate = XML_PARSER_CONTENT;
|
||||||
@@ -10970,12 +10970,12 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
|
|||||||
if (ctxt->errNo == 0)
|
if (ctxt->errNo == 0)
|
||||||
ret = XML_ERR_INTERNAL_ERROR;
|
ret = XML_ERR_INTERNAL_ERROR;
|
||||||
else
|
else
|
||||||
ret = ctxt->errNo;
|
ret = (xmlParserErrors)ctxt->errNo;
|
||||||
} else {
|
} else {
|
||||||
ret = 0;
|
ret = XML_ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((lst != NULL) && (ret == 0)) {
|
if ((lst != NULL) && (ret == XML_ERR_OK)) {
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -6085,7 +6085,7 @@ xmlRelaxNGCheckRules(xmlRelaxNGParserCtxtPtr ctxt,
|
|||||||
} else if (cur->depth == -4) {
|
} else if (cur->depth == -4) {
|
||||||
ret = XML_RELAXNG_CONTENT_COMPLEX;
|
ret = XML_RELAXNG_CONTENT_COMPLEX;
|
||||||
} else {
|
} else {
|
||||||
ret = (xmlRelaxNGContentType) cur->depth + 15;
|
ret = (xmlRelaxNGContentType) (cur->depth + 15);
|
||||||
}
|
}
|
||||||
} else if (cur->type == XML_RELAXNG_ELEMENT) {
|
} else if (cur->type == XML_RELAXNG_ELEMENT) {
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user