summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/opengl/OpenGLHelper.hxx3
-rw-r--r--soltools/mkdepend/main.c9
-rw-r--r--unoxml/source/xpath/xpathapi.cxx3
3 files changed, 15 insertions, 0 deletions
diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx
index 861af021a383..4f365c2e44ff 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -92,6 +92,9 @@ public:
* Insert a glDebugMessage into the queue - helpful for debugging
* with apitrace to annotate the output and correlate it with code.
*/
+#if defined __GNUC__
+ __attribute__ ((format (printf, 2, 3)))
+#endif
static void debugMsgPrint(const int nType, const char *pFormat, ...);
static void debugMsgStream(std::ostringstream const &pStream);
static void debugMsgStreamWarn(std::ostringstream const &pStream);
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index 7ee27c439f7d..b8b84b453476 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -654,6 +654,9 @@ void redirect(char *makefile)
fatalerr("cannot open \"%s\"\n", makefile ? makefile : "<NULL>");
}
+#if defined __GNUC__
+__attribute__ ((format (printf, 1, 2)))
+#endif
void fatalerr(char *msg, ...)
{
va_list args;
@@ -664,6 +667,9 @@ void fatalerr(char *msg, ...)
exit (1);
}
+#if defined __GNUC__
+__attribute__ ((format (printf, 1, 2)))
+#endif
void warning(char const *msg, ...)
{
#ifdef DEBUG_MKDEPEND
@@ -677,6 +683,9 @@ void warning(char const *msg, ...)
#endif /* DEBUG_MKDEPEND */
}
+#if defined __GNUC__
+__attribute__ ((format (printf, 1, 2)))
+#endif
void warning1(char const *msg, ...)
{
#ifdef DEBUG_MKDEPEND
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index 491be8cab0b7..5d3e6d8c6189 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -261,6 +261,9 @@ namespace XPath
extern "C" {
+#if defined __GNUC__
+ __attribute__ ((format (printf, 2, 3)))
+#endif
static void generic_error_func(void *, const char *format, ...)
{
char str[1000];