1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Chasing dead assignments reported by clang-scan

* SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c
  relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c
  xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations,
  but this led to a few real bugs and some part not yet understood
  (relaxng/interleave)
This commit is contained in:
Daniel Veillard
2009-09-07 14:58:47 +02:00
parent d44b936499
commit 594e5dfb48
17 changed files with 15 additions and 27 deletions

View File

@ -2227,7 +2227,7 @@ xmlFACompareRanges(xmlRegRangePtr range1, xmlRegRangePtr range2) {
if (((range1->neg == 0) && (range2->neg != 0)) ||
((range1->neg != 0) && (range2->neg == 0)))
ret = !ret;
return(1);
return(ret);
}
/**
@ -6309,6 +6309,7 @@ struct _xmlExpCtxt {
int size;
int nbElems;
int nb_nodes;
int maxNodes;
const char *expr;
const char *cur;
int nb_cons;
@ -6338,6 +6339,7 @@ xmlExpNewCtxt(int maxNodes, xmlDictPtr dict) {
memset(ret, 0, sizeof(xmlExpCtxt));
ret->size = size;
ret->nbElems = 0;
ret->maxNodes = maxNodes;
ret->table = xmlMalloc(size * sizeof(xmlExpNodePtr));
if (ret->table == NULL) {
xmlFree(ret);