core: Mark meta_fatal() as not returning

This also makes meta_fatal() not returning, even if a NULL format is
passed.

https://bugzilla.gnome.org/show_bug.cgi?id=780304

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl 2017-03-20 22:13:34 +08:00
parent 93c6a869ec
commit 7c226462e0
2 changed files with 4 additions and 2 deletions

View File

@ -470,7 +470,9 @@ meta_fatal (const char *format, ...)
gchar *str;
FILE *out;
g_return_if_fail (format != NULL);
g_warn_if_fail (format);
if (!format)
meta_exit (META_EXIT_ERROR);
va_start (args, format);
str = g_strdup_vprintf (format, args);

View File

@ -43,7 +43,7 @@ void meta_bug (const char *format,
void meta_warning (const char *format,
...) G_GNUC_PRINTF (1, 2);
void meta_fatal (const char *format,
...) G_GNUC_PRINTF (1, 2);
...) G_GNUC_PRINTF (1, 2) G_GNUC_NORETURN G_ANALYZER_NORETURN;
/**
* MetaDebugTopic: