mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 03:02:10 +01:00
gmessages: make g_assert_warning compiler friendly
https://bugzilla.gnome.org/show_bug.cgi?id=720708
This commit is contained in:
parent
dce88768dc
commit
ab9f63fadd
@ -1119,15 +1119,21 @@ g_assert_warning (const char *log_domain,
|
||||
const char *pretty_function,
|
||||
const char *expression)
|
||||
{
|
||||
g_log (log_domain,
|
||||
G_LOG_LEVEL_ERROR,
|
||||
expression
|
||||
? "file %s: line %d (%s): assertion failed: (%s)"
|
||||
: "file %s: line %d (%s): should not be reached",
|
||||
file,
|
||||
line,
|
||||
pretty_function,
|
||||
expression);
|
||||
if (expression)
|
||||
g_log (log_domain,
|
||||
G_LOG_LEVEL_ERROR,
|
||||
"file %s: line %d (%s): assertion failed: (%s)",
|
||||
file,
|
||||
line,
|
||||
pretty_function,
|
||||
expression);
|
||||
else
|
||||
g_log (log_domain,
|
||||
G_LOG_LEVEL_ERROR,
|
||||
"file %s: line %d (%s): should not be reached",
|
||||
file,
|
||||
line,
|
||||
pretty_function);
|
||||
_g_log_abort (FALSE);
|
||||
abort ();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user