From 064c0ea267c99951e93b0aaf52158086eb481abe Mon Sep 17 00:00:00 2001 From: Dan White Date: Fri, 27 Oct 2023 01:06:58 -0600 Subject: [PATCH] More unused code caught by newer Clang --- src/Externals/libxml2/catalog.c | 4 ++-- src/Externals/libxml2/debugXML.c | 10 +++++----- src/Externals/libxml2/dict.c | 6 +++--- src/Externals/libxml2/xmlschemas.c | 6 +++--- src/Externals/libxml2/xpath.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Externals/libxml2/catalog.c b/src/Externals/libxml2/catalog.c index 9f644de82f..22923a6177 100644 --- a/src/Externals/libxml2/catalog.c +++ b/src/Externals/libxml2/catalog.c @@ -2163,7 +2163,7 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) { int len = 0; int size = 50; xmlChar stop; - int count = 0; + //int count = 0; *id = NULL; @@ -2197,7 +2197,7 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) { buf = tmp; } buf[len++] = *cur; - count++; + //count++; NEXT; } buf[len] = 0; diff --git a/src/Externals/libxml2/debugXML.c b/src/Externals/libxml2/debugXML.c index 0383538343..422f5d7661 100644 --- a/src/Externals/libxml2/debugXML.c +++ b/src/Externals/libxml2/debugXML.c @@ -2803,7 +2803,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, { char prompt[500] = "/ > "; char *cmdline = NULL, *cur; - int nbargs; + //int nbargs; char command[100]; char arg[400]; int i; @@ -2855,7 +2855,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, * Parse the command itself */ cur = cmdline; - nbargs = 0; + //nbargs = 0; while ((*cur == ' ') || (*cur == '\t')) cur++; i = 0; @@ -2868,7 +2868,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, command[i] = 0; if (i == 0) continue; - nbargs++; + //nbargs++; /* * Parse the argument @@ -2882,8 +2882,8 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, arg[i++] = *cur++; } arg[i] = 0; - if (i != 0) - nbargs++; + //if (i != 0) + // nbargs++; /* * start interpreting the command diff --git a/src/Externals/libxml2/dict.c b/src/Externals/libxml2/dict.c index 3b4054f238..bd175d490b 100644 --- a/src/Externals/libxml2/dict.c +++ b/src/Externals/libxml2/dict.c @@ -680,7 +680,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 = 0; xmlDictEntryPtr insert; if ((dict == NULL) || (name == NULL)) @@ -709,7 +709,7 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) { (!xmlStrncmp(insert->name, name, len))) return(insert->name); #endif - nbi++; + //nbi++; } #ifdef __GNUC__ if (insert->len == len) { @@ -740,7 +740,7 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) { (!xmlStrncmp(tmp->name, name, len))) return(tmp->name); #endif - nbi++; + //nbi++; } #ifdef __GNUC__ if (tmp->len == len) { diff --git a/src/Externals/libxml2/xmlschemas.c b/src/Externals/libxml2/xmlschemas.c index e38b9d2dc4..eb06d8a5d0 100644 --- a/src/Externals/libxml2/xmlschemas.c +++ b/src/Externals/libxml2/xmlschemas.c @@ -19340,7 +19340,7 @@ xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt) { const xmlChar *cur, *end; const xmlChar *nsname = NULL, *location; - int count = 0; + //int count = 0; int ret = 0; xmlSchemaAttrInfoPtr iattr; @@ -19368,7 +19368,7 @@ xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt) end++; if (end == cur) break; - count++; + //count++; nsname = xmlDictLookup(vctxt->schema->dict, cur, end - cur); cur = end; } @@ -19382,7 +19382,7 @@ xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt) end++; if (end == cur) break; - count++; + //count++; location = xmlDictLookup(vctxt->schema->dict, cur, end - cur); cur = end; ret = xmlSchemaAssembleByLocation(vctxt, vctxt->schema, diff --git a/src/Externals/libxml2/xpath.c b/src/Externals/libxml2/xpath.c index 9da4def764..0ad378d603 100644 --- a/src/Externals/libxml2/xpath.c +++ b/src/Externals/libxml2/xpath.c @@ -11008,7 +11008,7 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) { xmlXPathObjectPtr retval; xmlStreamCtxtPtr patstream; - int nb_nodes = 0; + //int nb_nodes = 0; if ((ctxt == NULL) || (comp == NULL)) return(NULL); @@ -11098,7 +11098,7 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) { goto scan_children; do { next_node: - nb_nodes++; + //nb_nodes++; if (cur->type == XML_ELEMENT_NODE) { ret = xmlStreamPush(patstream, cur->name, (cur->ns ? cur->ns->href : NULL));