summaryrefslogtreecommitdiff
path: root/telepathy-glib/debug-internal.h
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-04-30 16:15:41 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-04-30 16:17:44 +0100
commit24422b4c6cbee6f0f491f26f177e350225657162 (patch)
treed3767e9451dc2cbb10e8b9c39ee8a6f97e7fd929 /telepathy-glib/debug-internal.h
parent4f47b4fba4d43fc2f323cc90c8a0f9b8a24ea512 (diff)
downloadtelepathy-glib-24422b4c6cbee6f0f491f26f177e350225657162.tar.gz
Make ERROR() expand to something the compiler knows can't return
Diffstat (limited to 'telepathy-glib/debug-internal.h')
-rw-r--r--telepathy-glib/debug-internal.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/telepathy-glib/debug-internal.h b/telepathy-glib/debug-internal.h
index ff81d09e2..68634fdf9 100644
--- a/telepathy-glib/debug-internal.h
+++ b/telepathy-glib/debug-internal.h
@@ -63,8 +63,14 @@ G_END_DECLS
#undef ERROR
#define ERROR(format, ...) \
- _tp_log (G_LOG_LEVEL_ERROR, DEBUG_FLAG, "%s: " format, \
- G_STRFUNC, ##__VA_ARGS__)
+ do \
+ { \
+ _tp_log (G_LOG_LEVEL_ERROR, DEBUG_FLAG, "%s: " format, \
+ G_STRFUNC, ##__VA_ARGS__); \
+ g_assert_not_reached (); \
+ } \
+ while (0)
+
#undef CRITICAL
#define CRITICAL(format, ...) \
_tp_log (G_LOG_LEVEL_CRITICAL, DEBUG_FLAG, "%s: " format, \