]> git.proxmox.com Git - mirror_qemu.git/commitdiff
compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINATED
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 23 Feb 2022 20:58:22 +0000 (00:58 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 22 Mar 2022 10:40:51 +0000 (14:40 +0400)
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
include/qom/object.h
scripts/checkpatch.pl
scripts/cocci-macro-file.h

index 8385e477c18e5c1896030dc5cc4678daa681a613..0a5e67fb970e361224014eae7b04f5de8c41a985 100644 (file)
@@ -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
index fae096f51cce1649a4f2083ad40680ae09f16d41..5f3d5b5bf532cc3627df4f017356d3dd3b5cf603 100644 (file)
@@ -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:
index 797738a8e83959b3ea969c109d2975ecc4a443bb..ddc6003de2800acc5387f4e4660613b732ebfe9b 100755 (executable)
@@ -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;
index 9daec24d78250724ffa44e5987f53dfefd946aab..3d1e9b50919a25424769f2728d00cbd43e239ac8 100644 (file)
@@ -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))