[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/21] compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINAT
|
From: |
marcandre . lureau |
|
Subject: |
[PULL 07/21] compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINATED |
|
Date: |
Tue, 22 Mar 2022 16:25:47 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
One less qemu-specific macro. It also helps to make some headers/units
only depend on glib, and thus moved in standalone projects eventually.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/qemu/compiler.h | 2 --
include/qom/object.h | 6 +++---
scripts/cocci-macro-file.h | 2 +-
scripts/checkpatch.pl | 2 +-
4 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 8385e477c18e..0a5e67fb970e 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -19,8 +19,6 @@
#define QEMU_NORETURN __attribute__ ((__noreturn__))
-#define QEMU_SENTINEL __attribute__((sentinel))
-
#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
# define QEMU_PACKED __attribute__((gcc_struct, packed))
#else
diff --git a/include/qom/object.h b/include/qom/object.h
index fae096f51cce..5f3d5b5bf532 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -616,7 +616,7 @@ Object *object_new_with_props(const char *typename,
Object *parent,
const char *id,
Error **errp,
- ...) QEMU_SENTINEL;
+ ...) G_GNUC_NULL_TERMINATED;
/**
* object_new_with_propv:
@@ -676,7 +676,7 @@ void object_apply_compat_props(Object *obj);
*
* Returns: %true on success, %false on error.
*/
-bool object_set_props(Object *obj, Error **errp, ...) QEMU_SENTINEL;
+bool object_set_props(Object *obj, Error **errp, ...) G_GNUC_NULL_TERMINATED;
/**
* object_set_propv:
@@ -728,7 +728,7 @@ void object_initialize(void *obj, size_t size, const char
*typename);
bool object_initialize_child_with_props(Object *parentobj,
const char *propname,
void *childobj, size_t size, const char *type,
- Error **errp, ...) QEMU_SENTINEL;
+ Error **errp, ...) G_GNUC_NULL_TERMINATED;
/**
* object_initialize_child_with_propsv:
diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h
index 9daec24d7825..3d1e9b50919a 100644
--- a/scripts/cocci-macro-file.h
+++ b/scripts/cocci-macro-file.h
@@ -21,7 +21,7 @@
/* From qemu/compiler.h */
#define QEMU_NORETURN __attribute__ ((__noreturn__))
#define G_GNUC_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
-#define QEMU_SENTINEL __attribute__((sentinel))
+#define G_GNUC_NULL_TERMINATED __attribute__((sentinel))
#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
# define QEMU_PACKED __attribute__((gcc_struct, packed))
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 797738a8e839..ddc6003de280 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -225,7 +225,7 @@ our $Attribute = qr{
volatile|
QEMU_NORETURN|
G_GNUC_WARN_UNUSED_RESULT|
- QEMU_SENTINEL|
+ G_GNUC_NULL_TERMINATED|
QEMU_PACKED|
G_GNUC_PRINTF
}x;
--
2.35.1.273.ge6ebfd0e8cbb
- [PULL 00/21] Fixes patches, marcandre . lureau, 2022/03/22
- [PULL 01/21] qemu-options: define -spice only #ifdef CONFIG_SPICE, marcandre . lureau, 2022/03/22
- [PULL 02/21] vl: typo fix in a comment, marcandre . lureau, 2022/03/22
- [PULL 03/21] m68k/nios2-semi: fix gettimeofday() result check, marcandre . lureau, 2022/03/22
- [PULL 04/21] Drop qemu_foo() socket API wrapper, marcandre . lureau, 2022/03/22
- [PULL 09/21] Move HOST_LONG_BITS to compiler.h, marcandre . lureau, 2022/03/22
- [PULL 05/21] Replace GCC_FMT_ATTR with G_GNUC_PRINTF, marcandre . lureau, 2022/03/22
- [PULL 07/21] compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINATED,
marcandre . lureau <=
- [PULL 06/21] compiler.h: replace QEMU_WARN_UNUSED_RESULT with G_GNUC_WARN_UNUSED_RESULT, marcandre . lureau, 2022/03/22
- [PULL 10/21] scripts/modinfo-collect: remove unused/dead code, marcandre . lureau, 2022/03/22
- [PULL 08/21] Simplify HOST_LONG_BITS, marcandre . lureau, 2022/03/22
- [PULL 11/21] util: remove needless includes, marcandre . lureau, 2022/03/22
- [PULL 12/21] util: remove the net/net.h dependency, marcandre . lureau, 2022/03/22
- [PULL 13/21] qapi: remove needless include, marcandre . lureau, 2022/03/22
- [PULL 14/21] meson: move int128 checks from configure, marcandre . lureau, 2022/03/22
- [PULL 15/21] meson: fix CONFIG_ATOMIC128 check, marcandre . lureau, 2022/03/22
- [PULL 16/21] qapi: remove needless include, marcandre . lureau, 2022/03/22
- [PULL 17/21] qga: remove bswap.h include, marcandre . lureau, 2022/03/22