diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-04-20 17:26:02 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-04-21 17:03:51 +0400 |
commit | 8905770b27be326d12a704629f3cb715642db6cc (patch) | |
tree | 1ae707fb78118acf7510a1b0632331b87eec031b /include/qemu | |
parent | 94ae6b579d5fa0e4e4ac16b0769350ee853ede8a (diff) | |
download | qemu-8905770b27be326d12a704629f3cb715642db6cc.zip qemu-8905770b27be326d12a704629f3cb715642db6cc.tar.gz qemu-8905770b27be326d12a704629f3cb715642db6cc.tar.bz2 |
compiler.h: replace QEMU_NORETURN with G_NORETURN
G_NORETURN was introduced in glib 2.68, fallback to G_GNUC_NORETURN in
glib-compat.
Note that this attribute must be placed before the function declaration
(bringing a bit of consistency in qemu codebase usage).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Message-Id: <20220420132624.2439741-20-marcandre.lureau@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/compiler.h | 2 | ||||
-rw-r--r-- | include/qemu/osdep.h | 3 | ||||
-rw-r--r-- | include/qemu/thread.h | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index c13bc8b..f12c0fb 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -22,8 +22,6 @@ #define QEMU_EXTERN_C extern #endif -#define QEMU_NORETURN __attribute__ ((__noreturn__)) - #if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) # define QEMU_PACKED __attribute__((gcc_struct, packed)) #else diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 848916f..14b6b65 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -177,7 +177,8 @@ extern "C" { * supports QEMU_ERROR, this will be reported at compile time; otherwise * this will be reported at link time due to the missing symbol. */ -extern void QEMU_NORETURN QEMU_ERROR("code path is reachable") +extern G_NORETURN +void QEMU_ERROR("code path is reachable") qemu_build_not_reached_always(void); #if defined(__OPTIMIZE__) && !defined(__NO_INLINE__) #define qemu_build_not_reached() qemu_build_not_reached_always() diff --git a/include/qemu/thread.h b/include/qemu/thread.h index 460568d..af19f2b 100644 --- a/include/qemu/thread.h +++ b/include/qemu/thread.h @@ -188,7 +188,7 @@ void qemu_thread_create(QemuThread *thread, const char *name, void *qemu_thread_join(QemuThread *thread); void qemu_thread_get_self(QemuThread *thread); bool qemu_thread_is_self(QemuThread *thread); -void qemu_thread_exit(void *retval) QEMU_NORETURN; +G_NORETURN void qemu_thread_exit(void *retval); void qemu_thread_naming(bool enable); struct Notifier; |