Commit b9e5b3a5 authored by Bastien Nocera's avatar Bastien Nocera

Merge branch 'wip/hadess/downgrade-assert' into 'master'

lib: Downgrade BUG* assertions to work-around crashes

Closes #77

See merge request !6
parents 21504c06 b1ac865a
Pipeline #1927 passed with stage
in 3 minutes and 3 seconds
......@@ -44,8 +44,14 @@
#define fp_warn g_warning
#define fp_err g_error
#define BUG_ON(condition) g_assert(!(condition))
#define BUG() g_assert_not_reached()
#define BUG_ON(condition) G_STMT_START \
if (condition) { \
char *s; \
s = g_strconcat ("BUG: (", #condition, ")", NULL); \
g_warning ("%s: %s() %s:%d", s, G_STRFUNC, __FILE__, __LINE__); \
g_free (s); \
} G_STMT_END
#define BUG() BUG_ON(1)
enum fp_dev_state {
DEV_STATE_INITIAL = 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment