libxml2 r3813 - in trunk: . doc doc/devhelp include/libxml
- From: veillard svn gnome org
- To: svn-commits-list gnome org
- Subject: libxml2 r3813 - in trunk: . doc doc/devhelp include/libxml
- Date: Sun, 18 Jan 2009 20:53:59 +0000 (UTC)
Author: veillard
Date: Sun Jan 18 20:53:59 2009
New Revision: 3813
URL: http://svn.gnome.org/viewvc/libxml2?rev=3813&view=rev
Log:
* include/libxml/parser.h include/libxml/xmlwriter.h
include/libxml/relaxng.h include/libxml/xmlversion.h.in
include/libxml/xmlwin32version.h.in include/libxml/valid.h
include/libxml/xmlschemas.h include/libxml/xmlerror.h:
port patch from Marcus Meissner to add gcc checking for
printf like functions parameters, should fix #65068
* doc/apibuild.py doc/*: modified the script accordingly
and regenerated
* xpath.c xmlmemory.c threads.c: fix a few warnings
Daniel
Modified:
trunk/ChangeLog
trunk/doc/apibuild.py
trunk/doc/devhelp/libxml2-parserInternals.html
trunk/doc/devhelp/libxml2-xmlversion.html
trunk/doc/devhelp/libxml2.devhelp
trunk/doc/libxml2-api.xml
trunk/doc/libxml2-refs.xml
trunk/include/libxml/parser.h
trunk/include/libxml/relaxng.h
trunk/include/libxml/valid.h
trunk/include/libxml/xmlerror.h
trunk/include/libxml/xmlschemas.h
trunk/include/libxml/xmlversion.h.in
trunk/include/libxml/xmlwin32version.h.in
trunk/include/libxml/xmlwriter.h
trunk/threads.c
trunk/xmlmemory.c
trunk/xpath.c
Modified: trunk/doc/apibuild.py
==============================================================================
--- trunk/doc/apibuild.py (original)
+++ trunk/doc/apibuild.py Sun Jan 18 20:53:59 2009
@@ -72,7 +72,8 @@
"ATTRIBUTE_UNUSED": (0, "macro keyword"),
"LIBEXSLT_PUBLIC": (0, "macro keyword"),
"X_IN_Y": (5, "macro function builder"),
- "ATTRIBUTE_ALLOC_SIZE": (3, "macro for gcc chaking extension"),
+ "ATTRIBUTE_ALLOC_SIZE": (3, "macro for gcc checking extension"),
+ "ATTRIBUTE_PRINTF": (5, "macro for gcc printf args checking extension"),
}
def escape(raw):
Modified: trunk/doc/devhelp/libxml2-parserInternals.html
==============================================================================
--- trunk/doc/devhelp/libxml2-parserInternals.html (original)
+++ trunk/doc/devhelp/libxml2-parserInternals.html Sun Jan 18 20:53:59 2009
@@ -268,7 +268,7 @@
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="XML_MAX_TEXT_LENGHT">Macro </a>XML_MAX_TEXT_LENGHT</h3><pre class="programlisting">#define <a href="#XML_MAX_TEXT_LENGHT">XML_MAX_TEXT_LENGHT</a>;
-</pre><p/>
+</pre><p>Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use <a href="libxml2-parser.html#XML_PARSE_HUGE">XML_PARSE_HUGE</a> option to override it.</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="XML_SUBSTITUTE_BOTH">Macro </a>XML_SUBSTITUTE_BOTH</h3><pre class="programlisting">#define <a href="#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a>;
Modified: trunk/doc/devhelp/libxml2-xmlversion.html
==============================================================================
--- trunk/doc/devhelp/libxml2-xmlversion.html (original)
+++ trunk/doc/devhelp/libxml2-xmlversion.html Sun Jan 18 20:53:59 2009
@@ -44,7 +44,7 @@
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">#define <a href="#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a>;
-#define <a href="#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a>;
+#define <a href="#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a>;
#define <a href="#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a>;
#define <a href="#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a>;
#define <a href="#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a>;
@@ -53,8 +53,8 @@
#define <a href="#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a>;
#define <a href="#LIBXML_XINCLUDE_ENABLED">LIBXML_XINCLUDE_ENABLED</a>;
#define <a href="#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a>;
-#define <a href="#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a>;
-#define <a href="#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a>;
+#define <a href="#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a>;
+#define <a href="#ATTRIBUTE_PRINTF">ATTRIBUTE_PRINTF</a>;
#define <a href="#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a>;
#define <a href="#WITHOUT_TRIO">WITHOUT_TRIO</a>;
#define <a href="#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a>;
@@ -70,11 +70,13 @@
#define <a href="#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a>;
#define <a href="#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a>;
#define <a href="#LIBXML_HTML_ENABLED">LIBXML_HTML_ENABLED</a>;
+#define <a href="#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a>;
#define <a href="#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a>;
#define <a href="#LIBXML_FTP_ENABLED">LIBXML_FTP_ENABLED</a>;
#define <a href="#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a>;
#define <a href="#LIBXML_ZLIB_ENABLED">LIBXML_ZLIB_ENABLED</a>;
-#define <a href="#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a>;
+#define <a href="#ATTRIBUTE_ALLOC_SIZE">ATTRIBUTE_ALLOC_SIZE</a>;
+#define <a href="#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a>;
#define <a href="#LIBXML_C14N_ENABLED">LIBXML_C14N_ENABLED</a>;
#define <a href="#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a>;
#define <a href="#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a>;
@@ -93,6 +95,14 @@
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="ATTRIBUTE_ALLOC_SIZE">Macro </a>ATTRIBUTE_ALLOC_SIZE</h3><pre class="programlisting">#define <a href="#ATTRIBUTE_ALLOC_SIZE">ATTRIBUTE_ALLOC_SIZE</a>;
+</pre><p>Macro used to indicate to GCC this is an allocator function</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="ATTRIBUTE_PRINTF">Macro </a>ATTRIBUTE_PRINTF</h3><pre class="programlisting">#define <a href="#ATTRIBUTE_PRINTF">ATTRIBUTE_PRINTF</a>;
+</pre><p>Macro used to indicate to GCC the parameter are printf like</p>
+</div>
+ <hr/>
<div class="refsect2" lang="en"><h3><a name="ATTRIBUTE_UNUSED">Macro </a>ATTRIBUTE_UNUSED</h3><pre class="programlisting">#define <a href="#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a>;
</pre><p>Macro used to signal to GCC unused function parameters</p>
</div>
Modified: trunk/doc/devhelp/libxml2.devhelp
==============================================================================
--- trunk/doc/devhelp/libxml2.devhelp (original)
+++ trunk/doc/devhelp/libxml2.devhelp Sun Jan 18 20:53:59 2009
@@ -52,6 +52,8 @@
</sub>
</chapters>
<functions>
+ <function name="ATTRIBUTE_ALLOC_SIZE" link="libxml2-xmlversion.html#ATTRIBUTE_ALLOC_SIZE"/>
+ <function name="ATTRIBUTE_PRINTF" link="libxml2-xmlversion.html#ATTRIBUTE_PRINTF"/>
<function name="ATTRIBUTE_UNUSED" link="libxml2-xmlversion.html#ATTRIBUTE_UNUSED"/>
<function name="BAD_CAST" link="libxml2-xmlstring.html#BAD_CAST"/>
<function name="BASE_BUFFER_SIZE" link="libxml2-tree.html#BASE_BUFFER_SIZE"/>
Modified: trunk/doc/libxml2-api.xml
==============================================================================
--- trunk/doc/libxml2-api.xml (original)
+++ trunk/doc/libxml2-api.xml Sun Jan 18 20:53:59 2009
@@ -3336,7 +3336,7 @@
<description>compile-time version informations for the XML library </description>
<author>Daniel Veillard </author>
<exports symbol='LIBXML_VERSION_EXTRA' type='macro'/>
- <exports symbol='LIBXML_MODULES_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_DOCB_ENABLED' type='macro'/>
<exports symbol='LIBXML_LEGACY_ENABLED' type='macro'/>
<exports symbol='LIBXML_READER_ENABLED' type='macro'/>
<exports symbol='LIBXML_THREAD_ENABLED' type='macro'/>
@@ -3345,8 +3345,8 @@
<exports symbol='LIBXML_DEBUG_ENABLED' type='macro'/>
<exports symbol='LIBXML_XINCLUDE_ENABLED' type='macro'/>
<exports symbol='ATTRIBUTE_UNUSED' type='macro'/>
- <exports symbol='LIBXML_DOCB_ENABLED' type='macro'/>
- <exports symbol='LIBXML_PUSH_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_MODULES_ENABLED' type='macro'/>
+ <exports symbol='ATTRIBUTE_PRINTF' type='macro'/>
<exports symbol='LIBXML_SAX1_ENABLED' type='macro'/>
<exports symbol='WITHOUT_TRIO' type='macro'/>
<exports symbol='LIBXML_SCHEMATRON_ENABLED' type='macro'/>
@@ -3362,11 +3362,13 @@
<exports symbol='LIBXML_MODULE_EXTENSION' type='macro'/>
<exports symbol='LIBXML_ICONV_ENABLED' type='macro'/>
<exports symbol='LIBXML_HTML_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_WRITER_ENABLED' type='macro'/>
<exports symbol='LIBXML_UNICODE_ENABLED' type='macro'/>
<exports symbol='LIBXML_FTP_ENABLED' type='macro'/>
<exports symbol='LIBXML_AUTOMATA_ENABLED' type='macro'/>
<exports symbol='LIBXML_ZLIB_ENABLED' type='macro'/>
- <exports symbol='LIBXML_WRITER_ENABLED' type='macro'/>
+ <exports symbol='ATTRIBUTE_ALLOC_SIZE' type='macro'/>
+ <exports symbol='LIBXML_PUSH_ENABLED' type='macro'/>
<exports symbol='LIBXML_C14N_ENABLED' type='macro'/>
<exports symbol='LIBXML_SCHEMAS_ENABLED' type='macro'/>
<exports symbol='DEBUG_MEMORY_LOCATION' type='macro'/>
@@ -3766,6 +3768,12 @@
</file>
</files>
<symbols>
+ <macro name='ATTRIBUTE_ALLOC_SIZE' file='xmlversion'>
+ <info>Macro used to indicate to GCC this is an allocator function</info>
+ </macro>
+ <macro name='ATTRIBUTE_PRINTF' file='xmlversion'>
+ <info>Macro used to indicate to GCC the parameter are printf like</info>
+ </macro>
<macro name='ATTRIBUTE_UNUSED' file='xmlversion'>
<info>Macro used to signal to GCC unused function parameters</info>
</macro>
@@ -4109,6 +4117,7 @@
<info>Identifiers can be longer, but this will be more costly at runtime.</info>
</macro>
<macro name='XML_MAX_TEXT_LENGHT' file='parserInternals'>
+ <info>Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it.</info>
</macro>
<macro name='XML_SAX2_MAGIC' file='parser'>
<info>Special constant found in SAX2 blocks initialized fields</info>
Modified: trunk/doc/libxml2-refs.xml
==============================================================================
--- trunk/doc/libxml2-refs.xml (original)
+++ trunk/doc/libxml2-refs.xml Sun Jan 18 20:53:59 2009
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<apirefs name='libxml2'>
<references>
+ <reference name='ATTRIBUTE_ALLOC_SIZE' href='html/libxml-xmlversion.html#ATTRIBUTE_ALLOC_SIZE'/>
+ <reference name='ATTRIBUTE_PRINTF' href='html/libxml-xmlversion.html#ATTRIBUTE_PRINTF'/>
<reference name='ATTRIBUTE_UNUSED' href='html/libxml-xmlversion.html#ATTRIBUTE_UNUSED'/>
<reference name='BAD_CAST' href='html/libxml-xmlstring.html#BAD_CAST'/>
<reference name='BASE_BUFFER_SIZE' href='html/libxml-tree.html#BASE_BUFFER_SIZE'/>
@@ -3526,6 +3528,8 @@
</references>
<alpha>
<letter name='A'>
+ <ref name='ATTRIBUTE_ALLOC_SIZE'/>
+ <ref name='ATTRIBUTE_PRINTF'/>
<ref name='ATTRIBUTE_UNUSED'/>
</letter>
<letter name='B'>
@@ -13782,6 +13786,8 @@
<ref name='xmlUCSIsYijingHexagramSymbols'/>
</file>
<file name='xmlversion'>
+ <ref name='ATTRIBUTE_ALLOC_SIZE'/>
+ <ref name='ATTRIBUTE_PRINTF'/>
<ref name='ATTRIBUTE_UNUSED'/>
<ref name='DEBUG_MEMORY_LOCATION'/>
<ref name='LIBXML_AUTOMATA_ENABLED'/>
@@ -15751,6 +15757,8 @@
</letter>
<letter name='G'>
<word name='GCC'>
+ <ref name='ATTRIBUTE_ALLOC_SIZE'/>
+ <ref name='ATTRIBUTE_PRINTF'/>
<ref name='ATTRIBUTE_UNUSED'/>
</word>
<word name='GEDecl'>
@@ -16322,6 +16330,9 @@
<ref name='_xmlParserCtxt'/>
<ref name='_xmlValidCtxt'/>
</word>
+ <word name='Maximum'>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
+ </word>
<word name='May'>
<ref name='xmlURIEscape'/>
</word>
@@ -18370,6 +18381,9 @@
<word name='XML_ERR_OK'>
<ref name='xmlParseInNodeContext'/>
</word>
+ <word name='XML_PARSE_HUGE'>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
+ </word>
<word name='XML_SCHEMAS_ELEM_GLOBAL'>
<ref name='XML_SCHEMAS_ELEM_TOPLEVEL'/>
</word>
@@ -18869,6 +18883,7 @@
<ref name='xmlParserInputDeallocate'/>
</word>
<word name='allocator'>
+ <ref name='ATTRIBUTE_ALLOC_SIZE'/>
<ref name='DEBUG_MEMORY'/>
</word>
<word name='allocators'>
@@ -18901,6 +18916,7 @@
<ref name='xmlSkipBlankChars'/>
</word>
<word name='allowed'>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
<ref name='_htmlElemDesc'/>
<ref name='_xmlElement'/>
<ref name='_xmlSchemaWildcard'/>
@@ -19566,6 +19582,7 @@
<ref name='xmlSearchNs'/>
</word>
<word name='boundary'>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
<ref name='xmlParseElementChildrenContentDecl'/>
<ref name='xmlParseElementMixedContentDecl'/>
</word>
@@ -19631,6 +19648,7 @@
<ref name='XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED'/>
</word>
<word name='building'>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
<ref name='_xmlParserCtxt'/>
<ref name='docbSAXParseDoc'/>
<ref name='docbSAXParseFile'/>
@@ -22485,6 +22503,7 @@
<ref name='xmlNewElementContent'/>
</word>
<word name='feature'>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
<ref name='xmlGetFeature'/>
<ref name='xmlGetFeaturesList'/>
<ref name='xmlHasFeature'/>
@@ -23632,6 +23651,8 @@
<ref name='xmlXPtrNewRange'/>
</word>
<word name='indicate'>
+ <ref name='ATTRIBUTE_ALLOC_SIZE'/>
+ <ref name='ATTRIBUTE_PRINTF'/>
<ref name='xmlParseExternalID'/>
<ref name='xmlParserInputGrow'/>
<ref name='xmlParserInputRead'/>
@@ -24401,6 +24422,7 @@
<ref name='xmlExpCtxtNbCons'/>
</word>
<word name='like'>
+ <ref name='ATTRIBUTE_PRINTF'/>
<ref name='IS_CHAR_CH'/>
<ref name='IS_DIGIT_CH'/>
<ref name='IS_EXTENDER_CH'/>
@@ -24422,6 +24444,9 @@
<ref name='xmlDecodeEntities'/>
<ref name='xmlPatternMaxDepth'/>
</word>
+ <word name='limitation'>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
+ </word>
<word name='limited'>
<ref name='_htmlElemDesc'/>
</word>
@@ -25776,6 +25801,7 @@
<ref name='xmlXPathNodeSetAddUnique'/>
</word>
<word name='option'>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
<ref name='xmlDOMWrapAdoptNode'/>
<ref name='xmlDOMWrapCloneNode'/>
<ref name='xmlDOMWrapReconcileNamespaces'/>
@@ -25911,6 +25937,7 @@
<ref name='_xmlParserInput'/>
</word>
<word name='override'>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
<ref name='resolveEntity'/>
<ref name='resolveEntitySAXFunc'/>
<ref name='xmlCatalogAdd'/>
@@ -27626,6 +27653,9 @@
<ref name='xmlLoadCatalog'/>
<ref name='xmlLoadCatalogs'/>
</word>
+ <word name='safety'>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
+ </word>
<word name='same'>
<ref name='HTML_COMMENT_NODE'/>
<ref name='HTML_ENTITY_REF_NODE'/>
@@ -28102,6 +28132,7 @@
</word>
<word name='single'>
<ref name='IS_DIGIT_CH'/>
+ <ref name='XML_MAX_TEXT_LENGHT'/>
<ref name='xmlCurrentChar'/>
<ref name='xmlParseAttValue'/>
<ref name='xmlParseElementMixedContentDecl'/>
Modified: trunk/include/libxml/parser.h
==============================================================================
--- trunk/include/libxml/parser.h (original)
+++ trunk/include/libxml/parser.h Sun Jan 18 20:53:59 2009
@@ -594,7 +594,7 @@
* Display and format a warning messages, callback.
*/
typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
- const char *msg, ...);
+ const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
/**
* errorSAXFunc:
* @ctx: an XML parser context
@@ -604,7 +604,7 @@
* Display and format an error messages, callback.
*/
typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
- const char *msg, ...);
+ const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
/**
* fatalErrorSAXFunc:
* @ctx: an XML parser context
@@ -616,7 +616,7 @@
* get all the callbacks for errors.
*/
typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
- const char *msg, ...);
+ const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
/**
* isStandaloneSAXFunc:
* @ctx: the user data (XML parser context)
Modified: trunk/include/libxml/relaxng.h
==============================================================================
--- trunk/include/libxml/relaxng.h (original)
+++ trunk/include/libxml/relaxng.h Sun Jan 18 20:53:59 2009
@@ -32,7 +32,7 @@
*
* Signature of an error callback from a Relax-NG validation
*/
-typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...);
+typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
/**
* xmlRelaxNGValidityWarningFunc:
@@ -42,7 +42,7 @@
*
* Signature of a warning callback from a Relax-NG validation
*/
-typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...);
+typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
/**
* A schemas validation context
@@ -114,27 +114,27 @@
XMLPUBFUN int XMLCALL
xmlRelaxNGInitTypes (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlRelaxNGCleanupTypes (void);
/*
* Interfaces for parsing.
*/
-XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
xmlRelaxNGNewParserCtxt (const char *URL);
-XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
xmlRelaxNGNewMemParserCtxt (const char *buffer,
int size);
-XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
XMLPUBFUN int XMLCALL
xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
- int flag);
+ int flag);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
@@ -149,12 +149,12 @@
xmlRelaxNGParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
-XMLPUBFUN xmlRelaxNGPtr XMLCALL
+XMLPUBFUN xmlRelaxNGPtr XMLCALL
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlRelaxNGFree (xmlRelaxNGPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlRelaxNGDump (FILE *output,
xmlRelaxNGPtr schema);
XMLPUBFUN void XMLCALL
@@ -164,12 +164,12 @@
/*
* Interfaces for validating
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn,
@@ -177,29 +177,29 @@
XMLPUBFUN void XMLCALL
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, void *ctx);
-XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
+XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
- xmlDocPtr doc);
+ xmlDocPtr doc);
/*
* Interfaces for progressive validation when possible
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
const xmlChar *data,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
Modified: trunk/include/libxml/valid.h
==============================================================================
--- trunk/include/libxml/valid.h (original)
+++ trunk/include/libxml/valid.h Sun Jan 18 20:53:59 2009
@@ -41,7 +41,7 @@
*/
typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
const char *msg,
- ...);
+ ...) ATTRIBUTE_PRINTF(2,3);
/**
* xmlValidityWarningFunc:
@@ -56,7 +56,7 @@
*/
typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
const char *msg,
- ...);
+ ...) ATTRIBUTE_PRINTF(2,3);
#ifdef IN_LIBXML
/**
Modified: trunk/include/libxml/xmlerror.h
==============================================================================
--- trunk/include/libxml/xmlerror.h (original)
+++ trunk/include/libxml/xmlerror.h Sun Jan 18 20:53:59 2009
@@ -61,7 +61,7 @@
XML_FROM_CHECK, /* The error checking module */
XML_FROM_WRITER, /* The xmlwriter module */
XML_FROM_MODULE, /* The dynamically loaded module module*/
- XML_FROM_I18N, /* The module handling character conversion */
+ XML_FROM_I18N, /* The module handling character conversion */
XML_FROM_SCHEMATRONV /* The Schematron validator module */
} xmlErrorDomain;
@@ -645,7 +645,7 @@
XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */
XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */
XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */
- XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
+ XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */
XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */
XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */
@@ -670,7 +670,7 @@
XML_SCHEMAV_CVC_IDC, /* 1877 */
XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
XML_SCHEMAV_MISC, /* 1879 */
- XML_XPTR_UNKNOWN_SCHEME = 1900,
+ XML_XPTR_UNKNOWN_SCHEME = 1900,
XML_XPTR_CHILDSEQ_START, /* 1901 */
XML_XPTR_EVAL_FAILED, /* 1902 */
XML_XPTR_EXTRA_OBJECTS, /* 1903 */
@@ -691,15 +691,15 @@
XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */
XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */
XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */
- XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
+ XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */
XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */
XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */
XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */
XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */
- XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */
- XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */
@@ -718,7 +718,7 @@
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */
- XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */
XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */
XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */
@@ -737,14 +737,14 @@
XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */
XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */
XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */
- XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
+ XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */
XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */
XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */
XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */
XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */
XML_SCHEMAP_NO_XMLNS, /* 3056 */
- XML_SCHEMAP_NO_XSI, /* 3057 */
+ XML_SCHEMAP_NO_XSI, /* 3057 */
XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */
XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */
XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */
@@ -843,7 +843,7 @@
*/
typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
const char *msg,
- ...);
+ ...) ATTRIBUTE_PRINTF(2,3);
/**
* xmlStructuredErrorFunc:
* @userData: user provided data for the error callback
@@ -858,38 +858,38 @@
* Use the following function to reset the two global variables
* xmlGenericError and xmlGenericErrorContext.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlSetGenericErrorFunc (void *ctx,
xmlGenericErrorFunc handler);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlSetStructuredErrorFunc (void *ctx,
xmlStructuredErrorFunc handler);
/*
* Default message routines used by SAX and Valid context for error
* and warning reporting.
*/
-XMLPUBFUN void XMLCDECL
+XMLPUBFUN void XMLCDECL
xmlParserError (void *ctx,
const char *msg,
- ...);
-XMLPUBFUN void XMLCDECL
+ ...) ATTRIBUTE_PRINTF(2,3);
+XMLPUBFUN void XMLCDECL
xmlParserWarning (void *ctx,
const char *msg,
- ...);
-XMLPUBFUN void XMLCDECL
+ ...) ATTRIBUTE_PRINTF(2,3);
+XMLPUBFUN void XMLCDECL
xmlParserValidityError (void *ctx,
const char *msg,
- ...);
-XMLPUBFUN void XMLCDECL
+ ...) ATTRIBUTE_PRINTF(2,3);
+XMLPUBFUN void XMLCDECL
xmlParserValidityWarning (void *ctx,
const char *msg,
- ...);
-XMLPUBFUN void XMLCALL
+ ...) ATTRIBUTE_PRINTF(2,3);
+XMLPUBFUN void XMLCALL
xmlParserPrintFileInfo (xmlParserInputPtr input);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlParserPrintFileContext (xmlParserInputPtr input);
/*
@@ -907,19 +907,19 @@
xmlResetError (xmlErrorPtr err);
XMLPUBFUN int XMLCALL
xmlCopyError (xmlErrorPtr from,
- xmlErrorPtr to);
+ xmlErrorPtr to);
#ifdef IN_LIBXML
/*
* Internal callback reporting routine
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
__xmlRaiseError (xmlStructuredErrorFunc schannel,
- xmlGenericErrorFunc channel,
- void *data,
+ xmlGenericErrorFunc channel,
+ void *data,
void *ctx,
- void *node,
- int domain,
+ void *node,
+ int domain,
int code,
xmlErrorLevel level,
const char *file,
@@ -930,10 +930,10 @@
int int1,
int col,
const char *msg,
- ...);
-XMLPUBFUN void XMLCALL
+ ...) ATTRIBUTE_PRINTF(16,17);
+XMLPUBFUN void XMLCALL
__xmlSimpleError (int domain,
- int code,
+ int code,
xmlNodePtr node,
const char *msg,
const char *extra);
Modified: trunk/include/libxml/xmlschemas.h
==============================================================================
--- trunk/include/libxml/xmlschemas.h (original)
+++ trunk/include/libxml/xmlschemas.h Sun Jan 18 20:53:59 2009
@@ -92,7 +92,7 @@
*
* Signature of an error callback from an XSD validation
*/
-typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
+typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
/**
* xmlSchemaValidityWarningFunc:
@@ -102,7 +102,7 @@
*
* Signature of a warning callback from an XSD validation
*/
-typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...);
+typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) ATTRIBUTE_PRINTF(2,3);
/**
* A schemas validation context
Modified: trunk/include/libxml/xmlversion.h.in
==============================================================================
--- trunk/include/libxml/xmlversion.h.in (original)
+++ trunk/include/libxml/xmlversion.h.in Sun Jan 18 20:53:59 2009
@@ -382,18 +382,27 @@
#define LIBXML_ZLIB_ENABLED
#endif
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+
/**
* ATTRIBUTE_UNUSED:
*
* Macro used to signal to GCC unused function parameters
*/
-#ifdef __GNUC__
-#ifdef HAVE_ANSIDECL_H
-#include <ansidecl.h>
-#endif
+
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED __attribute__((unused))
#endif
+
+/**
+ * ATTRIBUTE_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
+
#ifndef ATTRIBUTE_ALLOC_SIZE
# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
# define ATTRIBUTE_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
@@ -403,10 +412,43 @@
#else
# define ATTRIBUTE_ALLOC_SIZE(x)
#endif
+
+/**
+ * ATTRIBUTE_PRINTF:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+
+#ifndef ATTRIBUTE_PRINTF
+# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+# define ATTRIBUTE_PRINTF(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
+# else
+# define ATTRIBUTE_PRINTF(fmt,args)
+# endif
#else
+# define ATTRIBUTE_PRINTF(fmt,args)
+#endif
+
+#else /* ! __GNUC__ */
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
#define ATTRIBUTE_UNUSED
+/**
+ * ATTRIBUTE_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
#define ATTRIBUTE_ALLOC_SIZE(x)
-#endif
+/**
+ * ATTRIBUTE_PRINTF:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+#define ATTRIBUTE_PRINTF(fmt,args)
+#endif /* __GNUC__ */
#ifdef __cplusplus
}
Modified: trunk/include/libxml/xmlwin32version.h.in
==============================================================================
--- trunk/include/libxml/xmlwin32version.h.in (original)
+++ trunk/include/libxml/xmlwin32version.h.in Sun Jan 18 20:53:59 2009
@@ -242,18 +242,27 @@
#endif
#endif
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+
/**
* ATTRIBUTE_UNUSED:
*
* Macro used to signal to GCC unused function parameters
*/
-#ifdef __GNUC__
-#ifdef HAVE_ANSIDECL_H
-#include <ansidecl.h>
-#endif
+
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED
#endif
+
+/**
+ * ATTRIBUTE_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
+
#ifndef ATTRIBUTE_ALLOC_SIZE
# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
# define ATTRIBUTE_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
@@ -263,10 +272,28 @@
#else
# define ATTRIBUTE_ALLOC_SIZE(x)
#endif
+
+/**
+ * ATTRIBUTE_PRINTF:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+
+#ifndef ATTRIBUTE_PRINTF
+# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+# define ATTRIBUTE_PRINTF(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
+# else
+# define ATTRIBUTE_PRINTF(fmt,args)
+# endif
#else
+# define ATTRIBUTE_PRINTF(fmt,args)
+#endif
+
+#else /* !__GNUC__ */
#define ATTRIBUTE_UNUSED
+#define ATTRIBUTE_PRINTF(fmt,args)
#define ATTRIBUTE_ALLOC_SIZE(x)
-#endif
+#endif /* __GNUC__ */
/*
* #pragma comment(lib, "iconv.lib")
Modified: trunk/include/libxml/xmlwriter.h
==============================================================================
--- trunk/include/libxml/xmlwriter.h (original)
+++ trunk/include/libxml/xmlwriter.h Sun Jan 18 20:53:59 2009
@@ -69,11 +69,13 @@
XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(2,3);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
const char *format,
- va_list argptr);
+ va_list argptr)
+ ATTRIBUTE_PRINTF(2,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
writer,
const xmlChar *
@@ -102,12 +104,14 @@
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
const xmlChar * name,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(3,4);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
- va_list argptr);
+ va_list argptr)
+ ATTRIBUTE_PRINTF(3,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
writer,
const xmlChar * name,
@@ -118,14 +122,16 @@
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(5,6);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format,
- va_list argptr);
+ va_list argptr)
+ ATTRIBUTE_PRINTF(5,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
writer,
const xmlChar *
@@ -141,10 +147,12 @@
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(2,3);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
- const char *format, va_list argptr);
+ const char *format, va_list argptr)
+ ATTRIBUTE_PRINTF(2,0);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
const xmlChar * content, int len);
@@ -154,12 +162,14 @@
XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
writer,
const char
- *format, ...);
+ *format, ...)
+ ATTRIBUTE_PRINTF(2,3);
XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
writer,
const char
*format,
- va_list argptr);
+ va_list argptr)
+ ATTRIBUTE_PRINTF(2,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
const xmlChar *
content);
@@ -193,12 +203,14 @@
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(3,4);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
- va_list argptr);
+ va_list argptr)
+ ATTRIBUTE_PRINTF(3,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
writer,
const xmlChar * name,
@@ -209,14 +221,16 @@
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(5,6);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format,
- va_list argptr);
+ va_list argptr)
+ ATTRIBUTE_PRINTF(5,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
writer,
const xmlChar *
@@ -242,11 +256,13 @@
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
const xmlChar * target,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(3,4);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
const xmlChar * target,
- const char *format, va_list argptr);
+ const char *format, va_list argptr)
+ ATTRIBUTE_PRINTF(3,0);
XMLPUBFUN int XMLCALL
xmlTextWriterWritePI(xmlTextWriterPtr writer,
const xmlChar * target,
@@ -270,10 +286,12 @@
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(2,3);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
- const char *format, va_list argptr);
+ const char *format, va_list argptr)
+ ATTRIBUTE_PRINTF(2,0);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
const xmlChar * content);
@@ -296,13 +314,15 @@
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(5,6);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
- const char *format, va_list argptr);
+ const char *format, va_list argptr)
+ ATTRIBUTE_PRINTF(5,0);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
const xmlChar * name,
@@ -332,12 +352,14 @@
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(3,4);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
- va_list argptr);
+ va_list argptr)
+ ATTRIBUTE_PRINTF(3,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
writer,
const xmlChar *
@@ -360,12 +382,14 @@
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(3,4);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
- va_list argptr);
+ va_list argptr)
+ ATTRIBUTE_PRINTF(3,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
writer,
const xmlChar *
@@ -389,13 +413,15 @@
xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
- const char *format, ...);
+ const char *format, ...)
+ ATTRIBUTE_PRINTF(4,5);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const char *format,
- va_list argptr);
+ va_list argptr)
+ ATTRIBUTE_PRINTF(4,0);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
Modified: trunk/threads.c
==============================================================================
--- trunk/threads.c (original)
+++ trunk/threads.c Sun Jan 18 20:53:59 2009
@@ -919,7 +919,7 @@
}
DeleteCriticalSection(&cleanup_helpers_cs);
#elif defined HAVE_PTHREAD_H
- if ((pthread_key_delete != NULL) && (globalkey != NULL))
+ if ((libxml_is_threaded) && (pthread_key_delete != NULL))
pthread_key_delete(globalkey);
#endif
}
Modified: trunk/xmlmemory.c
==============================================================================
--- trunk/xmlmemory.c (original)
+++ trunk/xmlmemory.c Sun Jan 18 20:53:59 2009
@@ -205,7 +205,7 @@
if (xmlMemTraceBlockAt == ret) {
xmlGenericError(xmlGenericErrorContext,
- "%p : Malloc(%d) Ok\n", xmlMemTraceBlockAt, size);
+ "%p : Malloc(%ld) Ok\n", xmlMemTraceBlockAt, size);
xmlMallocBreakpoint();
}
@@ -273,7 +273,7 @@
if (xmlMemTraceBlockAt == ret) {
xmlGenericError(xmlGenericErrorContext,
- "%p : Malloc(%d) Ok\n", xmlMemTraceBlockAt, size);
+ "%p : Malloc(%ld) Ok\n", xmlMemTraceBlockAt, size);
xmlMallocBreakpoint();
}
@@ -348,7 +348,7 @@
}
if (xmlMemTraceBlockAt == ptr) {
xmlGenericError(xmlGenericErrorContext,
- "%p : Realloced(%d -> %d) Ok\n",
+ "%p : Realloced(%ld -> %ld) Ok\n",
xmlMemTraceBlockAt, p->mh_size, size);
xmlMallocBreakpoint();
}
Modified: trunk/xpath.c
==============================================================================
--- trunk/xpath.c (original)
+++ trunk/xpath.c Sun Jan 18 20:53:59 2009
@@ -13329,8 +13329,8 @@
URI = xmlXPathNsLookup(ctxt->context, op->value5);
if (URI == NULL) {
xmlGenericError(xmlGenericErrorContext,
- "xmlXPathCompOpEval: variable %s bound to undefined prefix %s\n",
- op->value4, op->value5);
+ "xmlXPathCompOpEval: variable %s bound to undefined prefix %s\n",
+ (char *) op->value4, (char *)op->value5);
return (total);
}
val = xmlXPathVariableLookupNS(ctxt->context,
@@ -13377,8 +13377,8 @@
URI = xmlXPathNsLookup(ctxt->context, op->value5);
if (URI == NULL) {
xmlGenericError(xmlGenericErrorContext,
- "xmlXPathCompOpEval: function %s bound to undefined prefix %s\n",
- op->value4, op->value5);
+ "xmlXPathCompOpEval: function %s bound to undefined prefix %s\n",
+ (char *)op->value4, (char *)op->value5);
return (total);
}
func = xmlXPathFunctionLookupNS(ctxt->context,
@@ -13386,8 +13386,8 @@
}
if (func == NULL) {
xmlGenericError(xmlGenericErrorContext,
- "xmlXPathCompOpEval: function %s not found\n",
- op->value4);
+ "xmlXPathCompOpEval: function %s not found\n",
+ (char *)op->value4);
XP_ERROR0(XPATH_UNKNOWN_FUNC_ERROR);
}
op->cache = XML_CAST_FPTR(func);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]