mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
lib: Downgrade BUG* assertions to work-around crashes #2
Same as b1ac865abd but for the drivers
API.
This commit is contained in:
@@ -42,8 +42,14 @@
|
|||||||
#define fp_warn g_warning
|
#define fp_warn g_warning
|
||||||
#define fp_err g_error
|
#define fp_err g_error
|
||||||
|
|
||||||
#define BUG_ON(condition) g_assert(!(condition))
|
#define BUG_ON(condition) G_STMT_START \
|
||||||
#define BUG() g_assert_not_reached()
|
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 {
|
enum fp_dev_state {
|
||||||
DEV_STATE_INITIAL = 0,
|
DEV_STATE_INITIAL = 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user