[Pkg-telepathy-commits] [libnice] 146/265: agent: Fix inlining of nice_debug() if NDEBUG is defined

Simon McVittie smcv at debian.org
Wed May 14 12:05:02 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 ac4d1b7f0e56f8f9fa92271a8b48c6edbc808a30
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date:   Fri Jan 31 11:52:15 2014 +0000

    agent: Fix inlining of nice_debug() if NDEBUG is defined
---
 agent/agent-priv.h | 4 ++--
 agent/debug.c      | 8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/agent/agent-priv.h b/agent/agent-priv.h
index a49d9a5..1745c12 100644
--- a/agent/agent-priv.h
+++ b/agent/agent-priv.h
@@ -236,8 +236,8 @@ void nice_debug_init (void);
 
 
 #ifdef NDEBUG
-static inline gboolean nice_debug_is_enabled (void) { return FALSE };
-static inline void nice_debug (const char *fmt, ...) G_GNUC_PRINTF (1, 2) { }
+static inline gboolean nice_debug_is_enabled (void) { return FALSE; }
+static inline void nice_debug (const char *fmt, ...) { }
 #else
 gboolean nice_debug_is_enabled (void);
 void nice_debug (const char *fmt, ...) G_GNUC_PRINTF (1, 2);
diff --git a/agent/debug.c b/agent/debug.c
index bd8ce84..ce223f1 100644
--- a/agent/debug.c
+++ b/agent/debug.c
@@ -93,10 +93,14 @@ void nice_debug_init (void)
   }
 }
 
+#ifndef NDEBUG
 gboolean nice_debug_is_enabled (void)
 {
   return debug_enabled;
 }
+#else
+/* Defined in agent-priv.h. */
+#endif
 
 void nice_debug_enable (gboolean with_stun)
 {
@@ -113,6 +117,7 @@ void nice_debug_disable (gboolean with_stun)
     stun_debug_disable ();
 }
 
+#ifndef NDEBUG
 void nice_debug (const char *fmt, ...)
 {
   va_list ap;
@@ -122,3 +127,6 @@ void nice_debug (const char *fmt, ...)
     va_end (ap);
   }
 }
+#else
+/* Defined in agent-priv.h. */
+#endif

-- 
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