mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-20 18:50:08 +03:00
parser: Mark 'length' member of xmlParserInput as unused
This commit is contained in:
parent
955c177f69
commit
c1bddd4c26
@ -2274,7 +2274,6 @@ htmlNewInputStream(htmlParserCtxtPtr ctxt) {
|
||||
input->free = NULL;
|
||||
input->version = NULL;
|
||||
input->consumed = 0;
|
||||
input->length = 0;
|
||||
return(input);
|
||||
}
|
||||
#endif
|
||||
|
@ -64,7 +64,7 @@ struct _xmlParserInput {
|
||||
const xmlChar *base; /* Base of the array to parse */
|
||||
const xmlChar *cur; /* Current char being parsed */
|
||||
const xmlChar *end; /* end of the array to parse */
|
||||
int length; /* length if known */
|
||||
int length; /* unused */
|
||||
int line; /* Current line */
|
||||
int col; /* Current column */
|
||||
unsigned long consumed; /* How many xmlChars already consumed */
|
||||
|
@ -1548,6 +1548,12 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* We create an input stream with a NULL buffer here and make the
|
||||
* input pointers reference the entity content directly. This is
|
||||
* unusual and somewhat dangerous.
|
||||
*/
|
||||
input = xmlNewInputStream(ctxt);
|
||||
if (input == NULL) {
|
||||
return(NULL);
|
||||
@ -1558,9 +1564,9 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
|
||||
if (entity->length == 0)
|
||||
entity->length = xmlStrlen(entity->content);
|
||||
input->cur = entity->content;
|
||||
input->length = entity->length;
|
||||
input->end = &entity->content[input->length];
|
||||
input->end = &entity->content[entity->length];
|
||||
input->entity = entity;
|
||||
|
||||
return(input);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user