diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-12 10:18:19 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-12 10:18:19 +0200 |
commit | 13868508386208f5a1a43b6c17991ad6f3652fea (patch) | |
tree | 5e05b3d60bc7386af22ffce590fb8bd5b0c2952c /Zend/zend_API.h | |
parent | f691693ebc7a0f6604455c004dc1ba78251c0ac1 (diff) | |
download | php-git-13868508386208f5a1a43b6c17991ad6f3652fea.tar.gz |
Use unused attribute for _dummy
The (void)_dummy is apparently considered a read of an uninitialized
variable. As it is a _Bool now, which has trap representations, this
is no longer considered legal and results in somewhat odd ubsan
warnings of the form:
runtime error: load of value 0, which is not a valid value for type 'zend_bool' (aka 'bool')
Diffstat (limited to 'Zend/zend_API.h')
-rw-r--r-- | Zend/zend_API.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h index ae391d98e5..8ed0e20871 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -1253,7 +1253,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num zval *_real_arg, *_arg = NULL; \ zend_expected_type _expected_type = Z_EXPECTED_LONG; \ char *_error = NULL; \ - zend_bool _dummy; \ + ZEND_ATTRIBUTE_UNUSED zend_bool _dummy; \ zend_bool _optional = 0; \ int _error_code = ZPP_ERROR_OK; \ ((void)_i); \ @@ -1261,7 +1261,6 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num ((void)_arg); \ ((void)_expected_type); \ ((void)_error); \ - ((void)_dummy); \ ((void)_optional); \ \ do { \ |