mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
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>
This commit is contained in:
12
qemu-img.c
12
qemu-img.c
@ -100,7 +100,8 @@ static void format_print(void *opaque, const char *name)
|
||||
printf(" %s", name);
|
||||
}
|
||||
|
||||
static void QEMU_NORETURN G_GNUC_PRINTF(1, 2) error_exit(const char *fmt, ...)
|
||||
static G_NORETURN G_GNUC_PRINTF(1, 2)
|
||||
void error_exit(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
@ -112,18 +113,21 @@ static void QEMU_NORETURN G_GNUC_PRINTF(1, 2) error_exit(const char *fmt, ...)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static void QEMU_NORETURN missing_argument(const char *option)
|
||||
static G_NORETURN
|
||||
void missing_argument(const char *option)
|
||||
{
|
||||
error_exit("missing argument for option '%s'", option);
|
||||
}
|
||||
|
||||
static void QEMU_NORETURN unrecognized_option(const char *option)
|
||||
static G_NORETURN
|
||||
void unrecognized_option(const char *option)
|
||||
{
|
||||
error_exit("unrecognized option '%s'", option);
|
||||
}
|
||||
|
||||
/* Please keep in synch with docs/tools/qemu-img.rst */
|
||||
static void QEMU_NORETURN help(void)
|
||||
static G_NORETURN
|
||||
void help(void)
|
||||
{
|
||||
const char *help_msg =
|
||||
QEMU_IMG_VERSION
|
||||
|
Reference in New Issue
Block a user