[Pkg-telepathy-commits] [libnice] 42/265: stun: Add printf function attribute

Simon McVittie smcv at debian.org
Wed May 14 12:04:51 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository libnice.

commit 0d2943b3bef98fa3bd0abafb3e8795694dcfc579
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date:   Tue Dec 17 10:05:17 2013 +0000

    stun: Add printf function attribute
    
    This shuts a compiler warning up and allows for format string checking
    of debug messages.
---
 stun/debug.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/stun/debug.h b/stun/debug.h
index 726397b..7396f88 100644
--- a/stun/debug.h
+++ b/stun/debug.h
@@ -37,6 +37,8 @@
 #ifndef STUN_DEBUG_H
 #define STUN_DEBUG_H
 
+#include <stddef.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -57,7 +59,12 @@ void stun_debug_enable (void);
 void stun_debug_disable (void);
 
 
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))
+void stun_debug (const char *fmt, ...)
+  __attribute__((__format__ (__printf__, 1, 2)));
+#else
 void stun_debug (const char *fmt, ...);
+#endif
 void stun_debug_bytes (const void *data, size_t len);
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git



More information about the Pkg-telepathy-commits mailing list