mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
More precise ifunc resolver return type
Fixes -Wattribute-alias warning.
This commit is contained in:
parent
fb718ccc7e
commit
7643cf1996
1 changed files with 5 additions and 2 deletions
|
@ -383,9 +383,12 @@ zend_string *php_base64_decode_ex_default(const unsigned char *str, size_t lengt
|
|||
PHPAPI zend_string *php_base64_encode(const unsigned char *str, size_t length) __attribute__((ifunc("resolve_base64_encode")));
|
||||
PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length, zend_bool strict) __attribute__((ifunc("resolve_base64_decode")));
|
||||
|
||||
typedef zend_string *(*base64_encode_func_t)(const unsigned char *, size_t);
|
||||
typedef zend_string *(*base64_decode_func_t)(const unsigned char *, size_t, zend_bool);
|
||||
|
||||
ZEND_NO_SANITIZE_ADDRESS
|
||||
ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */
|
||||
static void *resolve_base64_encode() {
|
||||
static base64_encode_func_t resolve_base64_encode() {
|
||||
# if ZEND_INTRIN_AVX2_FUNC_PROTO
|
||||
if (zend_cpu_supports_avx2()) {
|
||||
return php_base64_encode_avx2;
|
||||
|
@ -401,7 +404,7 @@ static void *resolve_base64_encode() {
|
|||
|
||||
ZEND_NO_SANITIZE_ADDRESS
|
||||
ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */
|
||||
static void *resolve_base64_decode() {
|
||||
static base64_decode_func_t resolve_base64_decode() {
|
||||
# if ZEND_INTRIN_AVX2_FUNC_PROTO
|
||||
if (zend_cpu_supports_avx2()) {
|
||||
return php_base64_decode_ex_avx2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue