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>
getsockname
gettimeofday
gnumakefile
-ignore-value
intprops
ioctl
isatty
#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)