From 9f519ebf36bee8efe1878f2adec2ab2b1937cdbc Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Thu, 14 Dec 2017 03:19:43 +0800 Subject: [PATCH 1/3] Only add fastcall attribute on variadic function when not using clang Eliminate "fastcall calling convention ignored on variadic function" warning when compiling on 32-bits system with clang --- Zend/zend_hash.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 852ec1c56af21..0bacd57ef6cc4 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -154,7 +154,11 @@ ZEND_API void ZEND_FASTCALL zend_hash_graceful_destroy(HashTable *ht); ZEND_API void ZEND_FASTCALL zend_hash_graceful_reverse_destroy(HashTable *ht); ZEND_API void ZEND_FASTCALL zend_hash_apply(HashTable *ht, apply_func_t apply_func); ZEND_API void ZEND_FASTCALL zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *); +#if !defined(__clang__) ZEND_API void ZEND_FASTCALL zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int, ...); +#else +ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int, ...); +#endif /* This function should be used with special care (in other words, * it should usually not be used). When used with the ZEND_HASH_APPLY_STOP From 2c21e949fc095b5f8df03fc89dd9a19285575c54 Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Thu, 14 Dec 2017 04:10:10 +0800 Subject: [PATCH 2/3] Drop fastcall attribute on variadic function entirely --- Zend/zend_hash.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 0bacd57ef6cc4..6a37e8a82b1b5 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -154,11 +154,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_graceful_destroy(HashTable *ht); ZEND_API void ZEND_FASTCALL zend_hash_graceful_reverse_destroy(HashTable *ht); ZEND_API void ZEND_FASTCALL zend_hash_apply(HashTable *ht, apply_func_t apply_func); ZEND_API void ZEND_FASTCALL zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *); -#if !defined(__clang__) -ZEND_API void ZEND_FASTCALL zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int, ...); -#else ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int, ...); -#endif /* This function should be used with special care (in other words, * it should usually not be used). When used with the ZEND_HASH_APPLY_STOP From 03aa4363a615efdcc94b153aabc5169f2cd192b5 Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Thu, 14 Dec 2017 04:18:16 +0800 Subject: [PATCH 3/3] Also drop fastcall attribute on variadic function in zend_hash.c --- Zend/zend_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index ec2141eec4a5a..29be2ca1869e0 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -1615,7 +1615,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_apply_with_argument(HashTable *ht, apply_f } -ZEND_API void ZEND_FASTCALL zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int num_args, ...) +ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int num_args, ...) { uint32_t idx; Bucket *p;