diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-04-30 16:15:41 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-04-30 16:17:44 +0100 |
commit | 24422b4c6cbee6f0f491f26f177e350225657162 (patch) | |
tree | d3767e9451dc2cbb10e8b9c39ee8a6f97e7fd929 /telepathy-glib/debug-internal.h | |
parent | 4f47b4fba4d43fc2f323cc90c8a0f9b8a24ea512 (diff) | |
download | telepathy-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.h | 10 |
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, \ |