Skip to content

Commit 06c3f9b

Browse files
committed
Use proper cast
Casting to `void**` silences the compiler, but only works because that is dereferenced to a generic `void*`.
1 parent fb1c7ef commit 06c3f9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2901,7 +2901,7 @@ static int zend_jit_setup(void)
29012901
/* To find offset of "_tsrm_ls_cache" in TLS segment we perform a linear scan of local TLS memory */
29022902
/* Probably, it might be better solution */
29032903
do {
2904-
void ***tls_mem = ((void**)__readgsqword(0x58))[_tls_index];
2904+
void ***tls_mem = ((void****)__readgsqword(0x58))[_tls_index];
29052905
void *val = _tsrm_ls_cache;
29062906
size_t offset = 0;
29072907
size_t size = (char*)&_tls_end - (char*)&_tls_start;
@@ -2925,7 +2925,7 @@ static int zend_jit_setup(void)
29252925
/* To find offset of "_tsrm_ls_cache" in TLS segment we perform a linear scan of local TLS memory */
29262926
/* Probably, it might be better solution */
29272927
do {
2928-
void ***tls_mem = ((void**)__readfsdword(0x2c))[_tls_index];
2928+
void ***tls_mem = ((void****)__readfsdword(0x2c))[_tls_index];
29292929
void *val = _tsrm_ls_cache;
29302930
size_t offset = 0;
29312931
size_t size = (char*)&_tls_end - (char*)&_tls_start;

0 commit comments

Comments
 (0)