mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Fix compiler warnings with disabled modules
This commit is contained in:
@ -348,6 +348,7 @@ xmlPythonFileRead (void * context, char * buffer, int len) {
|
|||||||
return(lenread);
|
return(lenread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlFileWrite:
|
* xmlFileWrite:
|
||||||
* @context: the I/O context
|
* @context: the I/O context
|
||||||
@ -392,6 +393,7 @@ xmlPythonFileWrite (void * context, const char * buffer, int len) {
|
|||||||
}
|
}
|
||||||
return(written);
|
return(written);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlPythonFileClose:
|
* xmlPythonFileClose:
|
||||||
@ -1364,11 +1366,11 @@ libxml_xmlCreatePushParser(ATTRIBUTE_UNUSED PyObject * self,
|
|||||||
return (pyret);
|
return (pyret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_htmlCreatePushParser(ATTRIBUTE_UNUSED PyObject * self,
|
libxml_htmlCreatePushParser(ATTRIBUTE_UNUSED PyObject * self,
|
||||||
PyObject * args)
|
PyObject * args)
|
||||||
{
|
{
|
||||||
#ifdef LIBXML_HTML_ENABLED
|
|
||||||
const char *chunk;
|
const char *chunk;
|
||||||
int size;
|
int size;
|
||||||
const char *URI;
|
const char *URI;
|
||||||
@ -1391,16 +1393,13 @@ libxml_htmlCreatePushParser(ATTRIBUTE_UNUSED PyObject * self,
|
|||||||
XML_CHAR_ENCODING_NONE);
|
XML_CHAR_ENCODING_NONE);
|
||||||
pyret = libxml_xmlParserCtxtPtrWrap(ret);
|
pyret = libxml_xmlParserCtxtPtrWrap(ret);
|
||||||
return (pyret);
|
return (pyret);
|
||||||
#else
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
return (Py_None);
|
|
||||||
#endif /* LIBXML_HTML_ENABLED */
|
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_HTML_ENABLED */
|
||||||
|
|
||||||
|
#ifdef LIBXML_SAX1_ENABLED
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
|
libxml_xmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
|
||||||
{
|
{
|
||||||
#ifdef LIBXML_SAX1_ENABLED
|
|
||||||
int recover;
|
int recover;
|
||||||
const char *URI;
|
const char *URI;
|
||||||
PyObject *pyobj_SAX = NULL;
|
PyObject *pyobj_SAX = NULL;
|
||||||
@ -1421,15 +1420,15 @@ libxml_xmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
|
|||||||
ctxt = xmlNewSAXParserCtxt(SAX, pyobj_SAX);
|
ctxt = xmlNewSAXParserCtxt(SAX, pyobj_SAX);
|
||||||
xmlCtxtReadFile(ctxt, URI, NULL, 0);
|
xmlCtxtReadFile(ctxt, URI, NULL, 0);
|
||||||
xmlFreeParserCtxt(ctxt);
|
xmlFreeParserCtxt(ctxt);
|
||||||
#endif /* LIBXML_SAX1_ENABLED */
|
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return (Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_SAX1_ENABLED */
|
||||||
|
|
||||||
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_htmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
|
libxml_htmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
|
||||||
{
|
{
|
||||||
#ifdef LIBXML_HTML_ENABLED
|
|
||||||
const char *URI;
|
const char *URI;
|
||||||
const char *encoding;
|
const char *encoding;
|
||||||
PyObject *pyobj_SAX = NULL;
|
PyObject *pyobj_SAX = NULL;
|
||||||
@ -1453,11 +1452,8 @@ libxml_htmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
|
|||||||
htmlFreeParserCtxt(ctxt);
|
htmlFreeParserCtxt(ctxt);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return (Py_None);
|
return (Py_None);
|
||||||
#else
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
return (Py_None);
|
|
||||||
#endif /* LIBXML_HTML_ENABLED */
|
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_HTML_ENABLED */
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
|
@ -2013,10 +2013,10 @@ static void walkDoc(xmlDocPtr doc) {
|
|||||||
static void doXPathDump(xmlXPathObjectPtr cur) {
|
static void doXPathDump(xmlXPathObjectPtr cur) {
|
||||||
switch(cur->type) {
|
switch(cur->type) {
|
||||||
case XPATH_NODESET: {
|
case XPATH_NODESET: {
|
||||||
int i;
|
|
||||||
xmlNodePtr node;
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
xmlOutputBufferPtr buf;
|
xmlOutputBufferPtr buf;
|
||||||
|
xmlNodePtr node;
|
||||||
|
int i;
|
||||||
|
|
||||||
if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
|
if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
|
||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
|
Reference in New Issue
Block a user