From 22b689a3f9c0babc1b6f29bdfd4722cf74d2ff6e Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Mon, 16 May 2011 16:58:02 +0000 Subject: Add php_ignore_value() macro to suppress unused return value warnings from gcc. There are times when we really don't care about the return value and this will cleanly tell gcc. --- main/php.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index d338462eae..278d6390fb 100644 --- a/main/php.h +++ b/main/php.h @@ -259,6 +259,11 @@ END_EXTERN_C() # endif #endif +#if defined(__GNUC__) && __GNUC__ >= 4 +# define php_ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) +#else +# define php_ignore_value(x) ((void) (x)) +#endif /* global variables */ #if !defined(PHP_WIN32) -- cgit v1.2.1