Skip to content

Commit afbb28d

Browse files
ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types (#10527)
* ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types Regression by commit a211956 * 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.
1 parent a211956 commit afbb28d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

TSRM/tsrm_win32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static void tsrm_win32_dtor(tsrm_win32_globals *globals)
9191
TSRM_API void tsrm_win32_startup(void)
9292
{/*{{{*/
9393
#ifdef ZTS
94-
ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_ctor)tsrm_win32_dtor);
94+
ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_dtor)tsrm_win32_dtor);
9595
#else
9696
tsrm_win32_ctor(&win32_globals);
9797
#endif

ext/opcache/jit/zend_jit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4878,7 +4878,7 @@ ZEND_EXT_API int zend_jit_debug_config(zend_long old_val, zend_long new_val, int
48784878
ZEND_EXT_API void zend_jit_init(void)
48794879
{
48804880
#ifdef ZTS
4881-
jit_globals_id = ts_allocate_id(&jit_globals_id, sizeof(zend_jit_globals), (ts_allocate_ctor) zend_jit_globals_ctor, zend_jit_globals_dtor);
4881+
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);
48824882
#else
48834883
zend_jit_globals_ctor(&jit_globals);
48844884
#endif

0 commit comments

Comments
 (0)