[PATCH 2/5] build: drop the ignore-value gnulib module

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

 



We don't need to care about very old GCC versions, so implementing the
ignore_value macro directly is not a significant burden.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 bootstrap.conf | 1 -
 src/internal.h | 8 +++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 7b20f1c371..8d3963fa2c 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -50,7 +50,6 @@ getpeername
 getsockname
 gettimeofday
 gnumakefile
-ignore-value
 intprops
 ioctl
 isatty
diff --git a/src/internal.h b/src/internal.h
index fc251067f0..e1a69be9f2 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -63,7 +63,13 @@
 #include "libvirt/virterror.h"
 
 #include "c-strcase.h"
-#include "ignore-value.h"
+
+/* Merely casting to (void) is not sufficient since the
+ * introduction of the "warn_unused_result" attribute
+ */
+#define ignore_value(x) \
+    (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; }))
+
 
 /* String equality tests, suggested by Jim Meyering. */
 #define STREQ(a, b) (strcmp(a, b) == 0)
-- 
2.21.0

--
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