summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--libexslt/exsltconfig.h.in2
-rw-r--r--libxslt/preproc.c8
-rw-r--r--libxslt/xsltconfig.h.in2
-rw-r--r--python/libxslt.c12
5 files changed, 19 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d105eff..07b292a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Tue Nov 4 19:08:53 PST 2003 William Brack <wbrack@mmm.com.hk>
+
+ Minor enhancements to eliminate compile/test warnings
+ * libxslt/xsltconfig.h.in, libexstl/exsltconfig.h.in:
+ changed macro ATTRIBUTE_UNUSED for gcc so that, if undefined,
+ it's defined as __attribute__((unused))
+ * python/libxslt.c: fixed ATTRIBUTE_UNUSED to appear after
+ variable declaration
+ * libxslt/preproc.c: minor change to get rid of unused var/code
+
Tue Nov 4 14:21:06 CET 2003 Daniel Veillard <daniel@veillard.com>
* doc/* NEWS: preparing release 1.1.0
diff --git a/libexslt/exsltconfig.h.in b/libexslt/exsltconfig.h.in
index 462487d6..962425c9 100644
--- a/libexslt/exsltconfig.h.in
+++ b/libexslt/exsltconfig.h.in
@@ -44,7 +44,7 @@ extern "C" {
#include <ansidecl.h>
#endif
#ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((unused))
#endif
#else
#define ATTRIBUTE_UNUSED
diff --git a/libxslt/preproc.c b/libxslt/preproc.c
index 63f7f7a2..50d662b0 100644
--- a/libxslt/preproc.c
+++ b/libxslt/preproc.c
@@ -204,7 +204,6 @@ xsltDocumentComp(xsltStylesheetPtr style, xmlNodePtr inst,
xsltTransformFunction function ATTRIBUTE_UNUSED) {
xsltStylePreCompPtr comp;
xmlChar *filename = NULL;
- xmlChar *URL = NULL;
comp = xsltNewStylePreComp(style, XSLT_FUNC_DOCUMENT);
if (comp == NULL)
@@ -250,12 +249,7 @@ xsltDocumentComp(xsltStylesheetPtr style, xmlNodePtr inst,
if (!comp->has_filename) {
goto error;
}
-
- if (filename != NULL) {
- comp->filename = filename;
- } else {
- comp->filename = NULL;
- }
+ comp->filename = filename;
error:
return ((xsltElemPreCompPtr) comp);
diff --git a/libxslt/xsltconfig.h.in b/libxslt/xsltconfig.h.in
index 00ce654b..98156382 100644
--- a/libxslt/xsltconfig.h.in
+++ b/libxslt/xsltconfig.h.in
@@ -105,7 +105,7 @@ extern "C" {
#include <ansidecl.h>
#endif
#ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((unused))
#endif
#else
#define ATTRIBUTE_UNUSED
diff --git a/python/libxslt.c b/python/libxslt.c
index e5a852dc..78b4607d 100644
--- a/python/libxslt.c
+++ b/python/libxslt.c
@@ -1,5 +1,5 @@
/*
- * libxslt.c: this modules implements the main part of the glue of the
+ libxslt.c: this modules implements the main part of the glue of the
* libxslt library and the Python interpreter. It provides the
* entry points where an automatically generated stub is either
* unpractical or would not match cleanly the Python model.
@@ -195,7 +195,7 @@ libxslt_xsltElementPreCompCallback(xsltStylesheetPtr style, xmlNodePtr inst,
return (NULL);
}
- args = Py_BuildValue("(OOO)",
+ args = Py_BuildValue((char *)"(OOO)",
libxslt_xsltStylesheetPtrWrap(style),
libxml_xmlNodePtrWrap(inst),
pyobj_element_f);
@@ -252,7 +252,7 @@ libxslt_xsltElementTransformCallback(xsltTransformContextPtr ctxt,
return;
}
- args = Py_BuildValue("OOOO",
+ args = Py_BuildValue((char *)"OOOO",
libxslt_xsltTransformContextPtrWrap(ctxt),
libxml_xmlNodePtrWrap(node),
libxml_xmlNodePtrWrap(inst),
@@ -503,7 +503,7 @@ libxslt_xsltApplyStylesheet(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
}
PyObject *
-libxslt_xsltSaveResultToString(PyObject *self, PyObject *args) {
+libxslt_xsltSaveResultToString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval; /* our final return value, a python string */
xmlChar *buffer;
int size = 0;
@@ -554,7 +554,7 @@ static PyObject *libxslt_xsltPythonErrorFuncHandler = NULL;
static PyObject *libxslt_xsltPythonErrorFuncCtxt = NULL;
static void
-libxslt_xsltErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg,
+libxslt_xsltErrorFuncHandler(void *ctx ATTRIBUTE_UNUSED, const char *msg,
...)
{
int size;
@@ -621,7 +621,7 @@ libxslt_xsltErrorInitialize(void)
}
PyObject *
-libxslt_xsltRegisterErrorHandler(ATTRIBUTE_UNUSED PyObject * self,
+libxslt_xsltRegisterErrorHandler(PyObject * self ATTRIBUTE_UNUSED,
PyObject * args)
{
PyObject *py_retval;