diff options
author | Emmanuel Fleury <emmanuel.fleury@gmail.com> | 2019-09-03 19:43:41 +0200 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2020-11-25 11:34:05 +0000 |
commit | 76426c0158323ab96b0991a4ed69358ed1c8e7e2 (patch) | |
tree | bf087d407c19c35f407f7ea38fdb4644f0edc673 | |
parent | c1d74e35c18aae1ffb2959e4e8c9d1e8c60103ba (diff) | |
download | glib-76426c0158323ab96b0991a4ed69358ed1c8e7e2.tar.gz |
Rewriting the G_GNUC_NORETURN into G_NORETURN macros everywhere
-rw-r--r-- | gio/tests/proxy.c | 2 | ||||
-rw-r--r-- | gio/tests/resolver.c | 2 | ||||
-rw-r--r-- | glib/gmessages.h | 5 | ||||
-rw-r--r-- | glib/goption.c | 2 | ||||
-rw-r--r-- | glib/gspawn.c | 2 | ||||
-rw-r--r-- | glib/gtestutils.h | 3 | ||||
-rw-r--r-- | glib/gutils.h | 2 |
7 files changed, 10 insertions, 8 deletions
diff --git a/gio/tests/proxy.c b/gio/tests/proxy.c index 50a20622e..e64355ae0 100644 --- a/gio/tests/proxy.c +++ b/gio/tests/proxy.c @@ -37,7 +37,7 @@ static const gchar *info = NULL; static GCancellable *cancellable = NULL; static gint return_value = 0; -static void G_GNUC_NORETURN +static G_NORETURN void usage (void) { fprintf (stderr, "Usage: proxy [-s] (uri|host:port|ip:port|path|srv/protocol/domain)\n"); diff --git a/gio/tests/resolver.c b/gio/tests/resolver.c index c57b81867..3e6d89670 100644 --- a/gio/tests/resolver.c +++ b/gio/tests/resolver.c @@ -40,7 +40,7 @@ static gboolean synchronous = FALSE; static guint connectable_count = 0; static GResolverRecordType record_type = 0; -static void G_GNUC_NORETURN +static G_NORETURN void usage (void) { fprintf (stderr, "Usage: resolver [-s] [hostname | IP | service/protocol/domain ] ...\n"); diff --git a/glib/gmessages.h b/glib/gmessages.h index 2e3650baf..43c6d67b9 100644 --- a/glib/gmessages.h +++ b/glib/gmessages.h @@ -283,11 +283,12 @@ void g_warn_message (const char *domain, const char *func, const char *warnexpr) G_ANALYZER_NORETURN; GLIB_DEPRECATED +G_NORETURN void g_assert_warning (const char *log_domain, const char *file, const int line, const char *pretty_function, - const char *expression) G_GNUC_NORETURN; + const char *expression); GLIB_AVAILABLE_IN_2_56 void g_log_structured_standard (const gchar *log_domain, @@ -399,7 +400,7 @@ void g_log_structured_standard (const gchar *log_domain, format) #endif #else /* no varargs macros */ -static void g_error (const gchar *format, ...) G_GNUC_NORETURN G_ANALYZER_NORETURN; +static G_NORETURN void g_error (const gchar *format, ...) G_ANALYZER_NORETURN; static void g_critical (const gchar *format, ...) G_ANALYZER_NORETURN; static inline void diff --git a/glib/goption.c b/glib/goption.c index bb9093a33..a351f84cb 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -1091,7 +1091,7 @@ g_option_context_get_help (GOptionContext *context, return g_string_free (string, FALSE); } -G_GNUC_NORETURN +G_NORETURN static void print_help (GOptionContext *context, gboolean main_help, diff --git a/glib/gspawn.c b/glib/gspawn.c index e720635db..fa3cfe7c0 100644 --- a/glib/gspawn.c +++ b/glib/gspawn.c @@ -1116,7 +1116,7 @@ write_all (gint fd, gconstpointer vbuf, gsize to_write) /* This function is called between fork() and exec() and hence must be * async-signal-safe (see signal-safety(7)). */ -G_GNUC_NORETURN +G_NORETURN static void write_err_and_exit (gint fd, gint msg) { diff --git a/glib/gtestutils.h b/glib/gtestutils.h index c7a0c5969..e93c49067 100644 --- a/glib/gtestutils.h +++ b/glib/gtestutils.h @@ -514,11 +514,12 @@ void g_assertion_message (const char *domain, const char *func, const char *message) G_ANALYZER_NORETURN; GLIB_AVAILABLE_IN_ALL +G_NORETURN void g_assertion_message_expr (const char *domain, const char *file, int line, const char *func, - const char *expr) G_GNUC_NORETURN; + const char *expr); GLIB_AVAILABLE_IN_ALL void g_assertion_message_cmpstr (const char *domain, const char *file, diff --git a/glib/gutils.h b/glib/gutils.h index 8a927d0b3..f8a6049ff 100644 --- a/glib/gutils.h +++ b/glib/gutils.h @@ -434,7 +434,7 @@ g_bit_storage_impl (gulong number) # define g_abort() abort () #else GLIB_AVAILABLE_IN_2_50 -void g_abort (void) G_GNUC_NORETURN G_ANALYZER_NORETURN; +G_NORETURN void g_abort (void) G_ANALYZER_NORETURN; #endif #endif |