Re: [PATCH 06/35] examples: use G_GNUC_UNUSED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/14/19 3:15 PM, Ján Tomko wrote:
Name the macro G_GNUC_UNUSED instead of ATTRIBUTE_UNUSED
to match the rest of libvirt code.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
  examples/c/misc/event-test.c | 140 +++++++++++++++++------------------
  1 file changed, 70 insertions(+), 70 deletions(-)

diff --git a/examples/c/misc/event-test.c b/examples/c/misc/event-test.c
index fcf4492470..533b8da9bf 100644
--- a/examples/c/misc/event-test.c
+++ b/examples/c/misc/event-test.c
@@ -21,17 +21,17 @@
  # define verify(cond)
  #endif
-#ifndef ATTRIBUTE_UNUSED
-# define ATTRIBUTE_UNUSED __attribute__((__unused__))
+#ifndef G_GNUC_UNUSED
+# define G_GNUC_UNUSED __attribute__((__unused__))
  #endif

Now, that we no longer use ATTRIBUTE_UNUSED - a private macro, can't we just #include <glib.h> here and drop this definition? This example is linked with glib anyways since it's linking with libvirt.so so we wouldn't be dragging in any dependency.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux