From 0936d46be706539a70ed69f18d69ef47e95e8421 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Feb 2023 11:23:55 +0100 Subject: [PATCH 1/2] ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types Regression by commit a21195650e53e34266806a8c379dd5a91f0dbb61 --- ext/opcache/jit/zend_jit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index b58614e50311e..d4699a4abc111 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -4878,7 +4878,7 @@ ZEND_EXT_API int zend_jit_debug_config(zend_long old_val, zend_long new_val, int ZEND_EXT_API void zend_jit_init(void) { #ifdef ZTS - jit_globals_id = ts_allocate_id(&jit_globals_id, sizeof(zend_jit_globals), (ts_allocate_ctor) zend_jit_globals_ctor, zend_jit_globals_dtor); + jit_globals_id = ts_allocate_id(&jit_globals_id, sizeof(zend_jit_globals), (ts_allocate_ctor) zend_jit_globals_ctor, (ts_allocate_dtor) zend_jit_globals_dtor); #else zend_jit_globals_ctor(&jit_globals); #endif From a1b6c8cbc1e556f8c13dc2de64c0859341669ad2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Feb 2023 11:25:50 +0100 Subject: [PATCH 2/2] TSRM/win32: fix ts_allocate_dtor cast The dtor was casted to ts_allocate_ctor; luckily, ts_allocate_dtor and ts_allocate_ctor just happen to be the same type. --- TSRM/tsrm_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 4b5c58d6982a1..0cb4d36d4d7ab 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -91,7 +91,7 @@ static void tsrm_win32_dtor(tsrm_win32_globals *globals) TSRM_API void tsrm_win32_startup(void) {/*{{{*/ #ifdef ZTS - ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_ctor)tsrm_win32_dtor); + ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_dtor)tsrm_win32_dtor); #else tsrm_win32_ctor(&win32_globals); #endif