[Bug 68390] improve debug logging for TpConnectionManager
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Sep 24 06:35:42 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=68390
--- Comment #9 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
(In reply to comment #7)
> > Shouldn't you guard this with #idef ENABLE_DEBUG ?
>
> Yeah, I suppose so.
Actually, the answer is "no". DEBUG() unconditionally evaluates its arguments
these days, because of a 2011 commit from wjt (see below).
He didn't say why in the commit message, but I suspect the answer is "so we
don't have to wrap everything in #ifdef ENABLE_DEBUG to avoid unused-variable
warnings".
I'm about this close --->||<--- to deleting the --disable-debug option
altogether.
commit 3e2df72ead78c9f96beb0cefb77e766733a390f1
Author: Will Thompson <will.thompson at collabora.co.uk>
Date: 2011-07-07 17:45:31 +0100
Make DEBUG a no-op static inline with --disable-debug.
diff --git a/telepathy-glib/debug-internal.h b/telepathy-glib/debug-internal.h
index 583e3d7..bad08aa 100644
--- a/telepathy-glib/debug-internal.h
+++ b/telepathy-glib/debug-internal.h
@@ -100,7 +100,16 @@ G_END_DECLS
G_STRFUNC, ##__VA_ARGS__)
# define DEBUGGING _tp_debug_flag_is_set (DEBUG_FLAG)
#else /* !defined (ENABLE_DEBUG) */
-# define DEBUG(format, ...) do {} while (0)
+# ifndef DEBUG_STUB_DEFINED
+static inline void
+DEBUG (
+ const gchar *format,
+ ...)
+{
+# define DEBUG_STUB_DEFINED 1
+# endif // ifndef DEBUG_STUB_DEFINED
+
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the telepathy-bugs
mailing list