]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: drop the ignore-value gnulib module
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 3 Oct 2019 15:25:45 +0000 (16:25 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 7 Oct 2019 12:39:40 +0000 (13:39 +0100)
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 <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
bootstrap.conf
src/internal.h

index 7b20f1c37106aaeb726ad16bd00f79aafcfe6b3f..8d3963fa2c71887b80bc2f3d1ca75b650e3dc5f4 100644 (file)
@@ -50,7 +50,6 @@ getpeername
 getsockname
 gettimeofday
 gnumakefile
-ignore-value
 intprops
 ioctl
 isatty
index fc251067f0a322328971268de8a89ca6b228cb4c..e1a69be9f2f37e0981e9d20f6170a2720fc643f8 100644 (file)
 #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)