1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-29 15:41:13 +03:00

Fix libxslt format warnings

* config.h.in: Let autoconf have its way with the file.
* configure.in: Replace "-Wformat" with
"-Wformat=2 -Wmissing-format-attribute".  Add
"-Wformat=2 -Wmissing-format-attribute" to default CFLAGS.
* libxslt/transform.c:
(xsltDocumentElem): Fix missing placeholder in format string.
Make "unsupported method" format strings more consistent by
putting method name in parenthesis.
(xsltApplyStylesheetInternal): Ditto.
* libxslt/xsltconfig.h.in:
(LIBXSLT_ATTR_FORMAT): Add macro to decorate functions that
have format string arguments.
* libxslt/xsltutils.c:
(xsltGenericErrorDefaultFunc): Add macro to decorate functions
that have format string arguments.
(xsltGenericDebugDefaultFunc): Ditto.
* libxslt/xsltutils.h:
(xsltTransformError): Add LIBXSLT_ATTR_FORMAT macro.
* xsltproc/xsltproc.c:
(endTimer): Add predeclaration with LIBXSLT_ATTR_FORMAT macro.

Fixes bug #762006.

https://bugzilla.gnome.org/show_bug.cgi?id=762006
This commit is contained in:
David Kilzer
2016-03-28 15:23:09 +02:00
committed by Nick Wellnhofer
parent d182d8f6ba
commit 866fc3b67e
6 changed files with 23 additions and 9 deletions

View File

@ -7,6 +7,7 @@
*/
#include "libxslt/libxslt.h"
#include "libxslt/xsltconfig.h"
#include "libexslt/exslt.h"
#include <stdio.h>
#ifdef HAVE_STRING_H
@ -236,6 +237,8 @@ my_gettimeofday(struct timeval *tvp, void *tzp)
#endif /* HAVE_SYS_TIMEB_H */
#endif /* !HAVE_GETTIMEOFDAY */
static void endTimer(const char *format, ...) LIBXSLT_ATTR_FORMAT(1,2);
#if defined(HAVE_GETTIMEOFDAY)
static struct timeval begin, endtime;
/*