From: Daniel P. Berrangé Date: Thu, 3 Oct 2019 15:25:45 +0000 (+0100) Subject: build: drop the ignore-value gnulib module X-Git-Tag: v5.9.0-rc1~355 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a605dde1f53a78d0bd20b7ec87146f8eb6dc4a12;p=thirdparty%2Flibvirt.git build: drop the ignore-value gnulib module 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é --- 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)