From a605dde1f53a78d0bd20b7ec87146f8eb6dc4a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 3 Oct 2019 16:25:45 +0100 Subject: [PATCH] build: drop the ignore-value gnulib module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't need to care about very old GCC versions, so implementing the ignore_value macro directly is not a significant burden. Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- 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)