mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
gmessages: make g_assert_warning compiler friendly
https://bugzilla.gnome.org/show_bug.cgi?id=720708
This commit is contained in:
committed by
Matthias Clasen
parent
dce88768dc
commit
ab9f63fadd
@@ -1119,15 +1119,21 @@ g_assert_warning (const char *log_domain,
|
|||||||
const char *pretty_function,
|
const char *pretty_function,
|
||||||
const char *expression)
|
const char *expression)
|
||||||
{
|
{
|
||||||
g_log (log_domain,
|
if (expression)
|
||||||
G_LOG_LEVEL_ERROR,
|
g_log (log_domain,
|
||||||
expression
|
G_LOG_LEVEL_ERROR,
|
||||||
? "file %s: line %d (%s): assertion failed: (%s)"
|
"file %s: line %d (%s): assertion failed: (%s)",
|
||||||
: "file %s: line %d (%s): should not be reached",
|
file,
|
||||||
file,
|
line,
|
||||||
line,
|
pretty_function,
|
||||||
pretty_function,
|
expression);
|
||||||
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);
|
_g_log_abort (FALSE);
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user