1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

warnings: Remove set-but-unused variables

Fixes compiler warnings with clang 15.
This commit is contained in:
Nick Wellnhofer 2022-10-24 20:47:10 +02:00
parent bffc67d15c
commit b6f1298ae7
4 changed files with 3 additions and 17 deletions

View File

@ -2171,7 +2171,6 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
int len = 0;
int size = 50;
xmlChar stop;
int count = 0;
*id = NULL;
@ -2205,7 +2204,6 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
buf = tmp;
}
buf[len++] = *cur;
count++;
NEXT;
}
buf[len] = 0;

4
dict.c
View File

@ -1007,7 +1007,7 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
*/
const xmlChar *
xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
unsigned long key, okey, nbi = 0;
unsigned long key, okey;
xmlDictEntryPtr insert;
unsigned int l;
@ -1042,7 +1042,6 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
(!xmlStrncmp(insert->name, name, l)))
return(insert->name);
#endif
nbi++;
}
#ifdef __GNUC__
if ((insert->okey == okey) && (insert->len == l)) {
@ -1084,7 +1083,6 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
(!xmlStrncmp(tmp->name, name, l)))
return(tmp->name);
#endif
nbi++;
}
#ifdef __GNUC__
if ((tmp->okey == skey) && (tmp->len == l)) {

View File

@ -21875,7 +21875,6 @@ xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt)
{
const xmlChar *cur, *end;
const xmlChar *nsname = NULL, *location;
int count = 0;
int ret = 0;
xmlSchemaAttrInfoPtr iattr;
@ -21910,7 +21909,7 @@ xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt)
end++;
if (end == cur)
break;
count++; /* TODO: Don't use the schema's dict. */
/* TODO: Don't use the schema's dict. */
nsname = xmlDictLookup(vctxt->schema->dict, cur, end - cur);
cur = end;
}
@ -21937,7 +21936,7 @@ xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt)
}
break;
}
count++; /* TODO: Don't use the schema's dict. */
/* TODO: Don't use the schema's dict. */
location = xmlDictLookup(vctxt->schema->dict, cur, end - cur);
cur = end;
ret = xmlSchemaAssembleByLocation(vctxt, vctxt->schema,

View File

@ -13644,8 +13644,6 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp,
xmlNodePtr cur = NULL, limit = NULL;
xmlStreamCtxtPtr patstream = NULL;
int nb_nodes = 0;
if ((ctxt == NULL) || (comp == NULL))
return(-1);
max_depth = xmlPatternMaxDepth(comp);
@ -13762,8 +13760,6 @@ next_node:
ctxt->opCount++;
}
nb_nodes++;
switch (cur->type) {
case XML_ELEMENT_NODE:
case XML_TEXT_NODE:
@ -13855,11 +13851,6 @@ scan_children:
done:
#if 0
printf("stream eval: checked %d nodes selected %d\n",
nb_nodes, retObj->nodesetval->nodeNr);
#endif
if (patstream)
xmlFreeStreamCtxt(patstream);
return(0);