[xslt] libxml2-2.5.7 and libxslt-1.0.30 -- bugs and patches
- From: Peter Breitenlohner <peb mppmu mpg de>
- To: xslt gnome org
- Cc: Daniel Veillard <veillard redhat com>
- Subject: [xslt] libxml2-2.5.7 and libxslt-1.0.30 -- bugs and patches
- Date: Fri, 13 Jun 2003 15:09:43 +0200 (CEST)
Hi,
1. attached please find two (short) patches for libxml2-2.5.7 and
libxslt-1.0.30.
When looking at the compiler warnings from building libxml2 and libxslt
(on a i686-linux-gnu system, gcc-2.95.3, linux-2.4.18, glibc-2.2.5) I found
that some of them were trivial to fix, whereas others are indeed (more or
less serious) bugs. With these patches I get no warnings other than these
four from libxml2:
trionan.c:514: warning: `trio_isfinite' defined but not used
trionan.c:742: warning: `trio_fpclassify' defined but not used
xmlreader.c:2866: warning: `xmlBase64Decode' defined but not used
testC14N.c:317: warning: `print_xpath_nodes' defined but not used
I am confident I did the bug-fixes right, but someone should certainly check
that!!!!
NB: I really think xmlFree should be prototyped differently such that it
accepts a `const char *' argument without warning, e.g.
void xmlFree(void *);
or similar.
2. Daniel, could you PLEASE PLEASE PLEASE move
man4/libexslt.4 => man3/libexslt.3
man4/libxslt.4 => man3/libxslt.3
This has already been mentioned a few times on this list (by me and others).
regards
Peter Breitenlohner <peb@mppmu.mpg.de>
diff -ur libxml2-2.5.7.orig/debugXML.c libxml2-2.5.7/debugXML.c
--- libxml2-2.5.7.orig/debugXML.c 2003-04-23 15:44:34.000000000 +0200
+++ libxml2-2.5.7/debugXML.c 2003-06-13 11:52:37.000000000 +0200
@@ -29,6 +29,7 @@
#include <libxml/xmlerror.h>
#include <libxml/globals.h>
#include <libxml/xpathInternals.h>
+#include <libxml/uri.h>
/**
* xmlDebugDumpString:
diff -ur libxml2-2.5.7.orig/relaxng.c libxml2-2.5.7/relaxng.c
--- libxml2-2.5.7.orig/relaxng.c 2003-04-19 01:49:47.000000000 +0200
+++ libxml2-2.5.7/relaxng.c 2003-06-13 13:59:04.000000000 +0200
@@ -6552,7 +6552,7 @@
if (ctxt->URL != NULL)
xmlFree(ctxt->URL);
if (ctxt->doc != NULL)
- xmlFreeDoc(ctxt->doc);
+ xmlRelaxNGFreeDocument(ctxt->doc);
if (ctxt->interleaves != NULL)
xmlHashFree(ctxt->interleaves, NULL);
if (ctxt->documents != NULL)
@@ -7853,7 +7853,7 @@
}
xmlRelaxNGFreeStates(ctxt, ctxt->states);
ctxt->states = NULL;
- if ((ret == 0) && (tmp == -1))
+ if (tmp == -1)
ctxt->pstate = -1;
ctxt->flags = oldflags;
}
diff -ur libxslt-1.0.30.orig/libexslt/sets.c libxslt-1.0.30/libexslt/sets.c
--- libxslt-1.0.30.orig/libexslt/sets.c 2003-04-23 23:03:40.000000000 +0200
+++ libxslt-1.0.30/libexslt/sets.c 2003-06-13 13:22:19.000000000 +0200
@@ -101,8 +101,8 @@
exsltSetsDistinctFunction (xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathObjectPtr obj;
xmlNodeSetPtr ns, ret;
- int boolval;
- void *user;
+ int boolval = 0;
+ void *user = NULL;
if (nargs != 1) {
xmlXPathSetArityError(ctxt);
diff -ur libxslt-1.0.30.orig/libxslt/variables.c libxslt-1.0.30/libxslt/variables.c
--- libxslt-1.0.30.orig/libxslt/variables.c 2003-04-30 21:57:35.000000000 +0200
+++ libxslt-1.0.30/libxslt/variables.c 2003-06-13 13:30:38.000000000 +0200
@@ -901,8 +901,8 @@
if (ncname == NULL)
return (-1);
- res = xmlHashLookup2(ctxt->globalVars, ncname, href);
- if (res != 0) {
+ result = xmlHashLookup2(ctxt->globalVars, ncname, href);
+ if (result != NULL) {
xsltTransformError(ctxt, style, NULL,
"Global parameter %s already defined\n", ncname);
}
diff -ur libxslt-1.0.30.orig/xsltproc/xsltproc.c libxslt-1.0.30/xsltproc/xsltproc.c
--- libxslt-1.0.30.orig/xsltproc/xsltproc.c 2003-02-24 23:24:43.000000000 +0100
+++ libxslt-1.0.30/xsltproc/xsltproc.c 2003-06-13 13:25:38.000000000 +0200
@@ -822,7 +822,7 @@
for (i = 0;i < nbstrparams;i++)
xmlFree(strparams[i]);
if (output != NULL)
- xmlFree(output);
+ xmlFree((char *)output);
xsltFreeSecurityPrefs(sec);
xsltCleanupGlobals();
xmlCleanupParser();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]