mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
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.
This commit is contained in:
parent
e0df4e3dba
commit
22b689a3f9
4 changed files with 12 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue