Skip to content

Commit 0752baa

Browse files
MaxKellermanndevnexen
authored andcommitted
Zend/zend_cpuinfo, ext/standard/crc32_x86: fix -Wstrict-prototypes
In plain C, a function without arguments must be explicitly declared (void). Close GH-10528
1 parent ba282f1 commit 0752baa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Zend/zend_cpuinfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static inline int zend_cpu_supports_avx2(void) {
208208
/* __builtin_cpu_supports has pclmul from gcc9 */
209209
#if PHP_HAVE_BUILTIN_CPU_SUPPORTS && (!defined(__GNUC__) || (ZEND_GCC_VERSION >= 9000))
210210
ZEND_NO_SANITIZE_ADDRESS
211-
static inline int zend_cpu_supports_pclmul() {
211+
static inline int zend_cpu_supports_pclmul(void) {
212212
#if PHP_HAVE_BUILTIN_CPU_INIT
213213
__builtin_cpu_init();
214214
#endif

ext/standard/crc32_x86.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ typedef size_t (*crc32_x86_simd_func_t)(X86_CRC32_TYPE type, uint32_t *crc, cons
323323

324324
ZEND_NO_SANITIZE_ADDRESS
325325
ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */
326-
static crc32_x86_simd_func_t resolve_crc32_x86_simd_update() {
326+
static crc32_x86_simd_func_t resolve_crc32_x86_simd_update(void) {
327327
if (zend_cpu_supports_sse42() && zend_cpu_supports_pclmul()) {
328328
return crc32_sse42_pclmul_update;
329329
}

0 commit comments

Comments
 (0)