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(a)redhat.com>
---
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