summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2005-12-10 11:11:12 +0000
committerDaniel Veillard <veillard@src.gnome.org>2005-12-10 11:11:12 +0000
commit6a0baa0cd89b402cdfbb63e9c40f291ebd191f1d (patch)
treeae52209e948d18cae432e347012b7265177e9daf
parentffe47feb2725849a6eb47299af87548fa0f52d4f (diff)
downloadlibxml2-6a0baa0cd89b402cdfbb63e9c40f291ebd191f1d.tar.gz
fixed a number of warnings shown by HP-UX compiler and reported by Rick
* HTMLparser.c configure.in parserInternals.c runsuite.c runtest.c testapi.c xmlschemas.c xmlschemastypes.c xmlstring.c: fixed a number of warnings shown by HP-UX compiler and reported by Rick Jones Daniel
-rw-r--r--ChangeLog6
-rw-r--r--HTMLparser.c8
-rw-r--r--configure.in2
-rw-r--r--doc/xml.html3
-rw-r--r--parserInternals.c2
-rw-r--r--runsuite.c19
-rw-r--r--runtest.c2
-rw-r--r--testapi.c6
-rw-r--r--xmlschemas.c21
-rw-r--r--xmlschemastypes.c2
-rw-r--r--xmlstring.c2
11 files changed, 30 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index eb0c99e9..0f62ef13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Dec 10 12:08:28 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c configure.in parserInternals.c runsuite.c runtest.c
+ testapi.c xmlschemas.c xmlschemastypes.c xmlstring.c: fixed a number
+ of warnings shown by HP-UX compiler and reported by Rick Jones
+
Fri Dec 9 18:57:31 CET 2005 Rob Richards <rrichards@ctindustries.net>
* xmlwriter.c: Insert space between pubid and sysid when both
diff --git a/HTMLparser.c b/HTMLparser.c
index 4988a2fb..12afdd85 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -4779,7 +4779,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
}
break;
case XML_PARSER_START_TAG: {
- const xmlChar *name, *oldname;
+ const xmlChar *name;
int failed;
const htmlElemDesc * info;
@@ -4832,7 +4832,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
SKIP(2);
if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
ctxt->sax->endElement(ctxt->userData, name);
- oldname = htmlnamePop(ctxt);
+ htmlnamePop(ctxt);
ctxt->instate = XML_PARSER_CONTENT;
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
@@ -4853,7 +4853,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
*/
if (xmlStrEqual(name, ctxt->name)) {
nodePop(ctxt);
- oldname = htmlnamePop(ctxt);
+ htmlnamePop(ctxt);
}
ctxt->instate = XML_PARSER_CONTENT;
@@ -4870,7 +4870,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
if ((info != NULL) && (info->empty)) {
if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
ctxt->sax->endElement(ctxt->userData, name);
- oldname = htmlnamePop(ctxt);
+ htmlnamePop(ctxt);
}
ctxt->instate = XML_PARSER_CONTENT;
#ifdef DEBUG_PUSH
diff --git a/configure.in b/configure.in
index f3af76ef..5aa8ea83 100644
--- a/configure.in
+++ b/configure.in
@@ -589,7 +589,7 @@ dnl DEC : Enable NaN/Inf
dnl
if test "${GCC}" != "yes" ; then
case "${host}" in
- *-*-hpux* )
+ hppa*-*-hpux* )
CFLAGS="${CFLAGS} -Wp,-H30000"
;;
*-dec-osf* )
diff --git a/doc/xml.html b/doc/xml.html
index 05e5a3be..7f5dec64 100644
--- a/doc/xml.html
+++ b/doc/xml.html
@@ -10,8 +10,7 @@
<body bgcolor="#ffffff">
<h1 align="center">The XML C parser and toolkit of Gnome</h1>
-<h1>Note: this is the flat content of the <a href="index.html">web
-site</a></h1>
+<h1>Note: this is the flat content of the <a href="index.html">web site</a></h1>
<h1 style="text-align: center">libxml, a.k.a. gnome-xml</h1>
diff --git a/parserInternals.c b/parserInternals.c
index aad43bc0..9e9e03fd 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -1880,7 +1880,7 @@ xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
int found = 0;
if ((seq == NULL) || (node == NULL))
- return (-1);
+ return ((unsigned long) -1);
/* Do a binary search for the key */
lower = 1;
diff --git a/runsuite.c b/runsuite.c
index debf456a..4e9858a4 100644
--- a/runsuite.c
+++ b/runsuite.c
@@ -93,7 +93,6 @@ static int nb_internals = 0;
static int nb_schematas = 0;
static int nb_unimplemented = 0;
static int nb_leaks = 0;
-static long libxmlMemoryAllocatedBase = 0;
static int extraMemoryFromResolver = 0;
static int
@@ -235,7 +234,6 @@ initializeLibxml2(void) {
xmlSchemaInitTypes();
xmlRelaxNGInitTypes();
#endif
- libxmlMemoryAllocatedBase = xmlMemUsed();
}
static xmlNodePtr
@@ -1051,7 +1049,7 @@ done:
int
main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
- int res, ret = 0;
+ int ret = 0;
int old_errors, old_tests, old_leaks;
logfile = fopen(LOGFILE, "w");
@@ -1069,7 +1067,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
old_errors = nb_errors;
old_tests = nb_tests;
old_leaks = nb_leaks;
- res = xsdTest();
+ xsdTest();
if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
printf("Ran %d tests, no errors\n", nb_tests - old_tests);
else
@@ -1080,7 +1078,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
old_errors = nb_errors;
old_tests = nb_tests;
old_leaks = nb_leaks;
- res = rngTest1();
+ rngTest1();
if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
printf("Ran %d tests, no errors\n", nb_tests - old_tests);
else
@@ -1091,7 +1089,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
old_errors = nb_errors;
old_tests = nb_tests;
old_leaks = nb_leaks;
- res = rngTest2();
+ rngTest2();
if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
printf("Ran %d tests, no errors\n", nb_tests - old_tests);
else
@@ -1104,8 +1102,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
old_leaks = nb_leaks;
nb_internals = 0;
nb_schematas = 0;
- res = xstcMetadata(
- "xstc/Tests/Metadata/NISTXMLSchemaDatatypes.testSet",
+ xstcMetadata("xstc/Tests/Metadata/NISTXMLSchemaDatatypes.testSet",
"xstc/Tests/Metadata/");
if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
printf("Ran %d tests (%d schemata), no errors\n",
@@ -1122,8 +1119,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
old_leaks = nb_leaks;
nb_internals = 0;
nb_schematas = 0;
- res = xstcMetadata(
- "xstc/Tests/Metadata/SunXMLSchema1-0-20020116.testSet",
+ xstcMetadata("xstc/Tests/Metadata/SunXMLSchema1-0-20020116.testSet",
"xstc/Tests/");
if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
printf("Ran %d tests (%d schemata), no errors\n",
@@ -1140,8 +1136,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
old_leaks = nb_leaks;
nb_internals = 0;
nb_schematas = 0;
- res = xstcMetadata(
- "xstc/Tests/Metadata/MSXMLSchema1-0-20020116.testSet",
+ xstcMetadata("xstc/Tests/Metadata/MSXMLSchema1-0-20020116.testSet",
"xstc/Tests/");
if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
printf("Ran %d tests (%d schemata), no errors\n",
diff --git a/runtest.c b/runtest.c
index 497a892e..02fc159c 100644
--- a/runtest.c
+++ b/runtest.c
@@ -209,7 +209,6 @@ static void globfree(glob_t *pglob) {
static int nb_tests = 0;
static int nb_errors = 0;
static int nb_leaks = 0;
-static long libxmlMemoryAllocatedBase = 0;
static int extraMemoryFromResolver = 0;
static int
@@ -541,7 +540,6 @@ initializeLibxml2(void) {
xmlSchemaInitTypes();
xmlRelaxNGInitTypes();
#endif
- libxmlMemoryAllocatedBase = xmlMemUsed();
}
diff --git a/testapi.c b/testapi.c
index eefc2891..9f35b28e 100644
--- a/testapi.c
+++ b/testapi.c
@@ -283,7 +283,7 @@ static void des_long(int no ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED, int nr
static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
if (no == 0) return('a');
if (no == 1) return(' ');
- if (no == 2) return('ø');
+ if (no == 2) return((xmlChar) 'ø');
return(0);
}
@@ -296,7 +296,7 @@ static unsigned int gen_unsigned_int(int no, int nr ATTRIBUTE_UNUSED) {
if (no == 0) return(0);
if (no == 1) return(1);
if (no == 2) return(122);
- return(-1);
+ return((unsigned int) -1);
}
static void des_unsigned_int(int no ATTRIBUTE_UNUSED, unsigned int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
@@ -308,7 +308,7 @@ static unsigned long gen_unsigned_long(int no, int nr ATTRIBUTE_UNUSED) {
if (no == 0) return(0);
if (no == 1) return(1);
if (no == 2) return(122);
- return(-1);
+ return((unsigned long) -1);
}
static void des_unsigned_long(int no ATTRIBUTE_UNUSED, unsigned long val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
diff --git a/xmlschemas.c b/xmlschemas.c
index bbbd6dcf..79d58a00 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -2497,7 +2497,7 @@ xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt,
xmlChar *str = NULL, *msg = NULL;
xmlChar *localName, *nsName;
const xmlChar *cur, *end;
- int i, is_not;
+ int i;
xmlSchemaFormatNodeForError(&msg, actxt, node);
msg = xmlStrcat(msg, (const xmlChar *) message);
@@ -2520,11 +2520,8 @@ xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt,
continue;
if ((cur[0] == 'n') && (cur[1] == 'o') && (cur[2] == 't') &&
(cur[3] == ' ')) {
- is_not = 1;
cur += 4;
str = xmlStrcat(str, BAD_CAST "##other");
- } else {
- is_not = 0;
}
/*
* Get the local name.
@@ -7989,7 +7986,6 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt,
*/
if (nsList != NULL) {
int i, count = 0;
- xmlNsPtr ns;
for (i = 0; nsList[i] != NULL; i++)
count++;
@@ -8003,7 +7999,6 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt,
return (-1);
}
for (i = 0; i < count; i++) {
- ns = nsList[i];
nsArray[2 * i] = nsList[i]->href;
nsArray[2 * i + 1] = nsList[i]->prefix;
}
@@ -13229,10 +13224,8 @@ xmlSchemaIsDerivedFromBuiltInType(xmlSchemaTypePtr type, int valType)
(type->builtInType == XML_SCHEMAS_ANYTYPE))
return (0);
return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType));
- } else
- return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType));
-
- return (0);
+ }
+ return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType));
}
#if 0
@@ -13272,11 +13265,8 @@ xmlSchemaQueryBuiltInType(xmlSchemaTypePtr type)
if (WXS_IS_COMPLEX(type))
return (NULL);
if (type->type == XML_SCHEMA_TYPE_BASIC)
- return(type);
- else
- return(xmlSchemaQueryBuiltInType(type->subtypes));
-
- return (NULL);
+ return(type);
+ return(xmlSchemaQueryBuiltInType(type->subtypes));
}
/**
@@ -17776,7 +17766,6 @@ xmlSchemaTypeFixupWhitespace(xmlSchemaTypePtr type)
break;
}
}
- return (0);
}
return (0);
}
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index bff445a1..ffb25059 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -1696,7 +1696,7 @@ xmlSchemaValidateDates (xmlSchemaValType type,
ret = _xmlSchemaParseTimeZone(&(dt->value.date), &cur);
if (collapse)
while IS_WSP_BLANK_CH(*cur) cur++;
- if ((ret != 0) || (*cur != 0) || !VALID_DATETIME((&(dt->value.date))))
+ if ((ret != 0) || (*cur != 0) || (!(VALID_DATETIME((&(dt->value.date))))))
goto error;
diff --git a/xmlstring.c b/xmlstring.c
index 67a20b9a..2ef62fba 100644
--- a/xmlstring.c
+++ b/xmlstring.c
@@ -148,7 +148,7 @@ xmlStrcmp(const xmlChar *str1, const xmlChar *str2) {
* @str2: the second xmlChar *
*
* Check if both string are equal of have same content
- * Should be a bit more readable and faster than xmlStrEqual()
+ * Should be a bit more readable and faster than xmlStrcmp()
*
* Returns 1 if they are equal, 0 if they are different
*/