mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix -Wpointer-type-mismatch warning (GH-17453)
`GetProcAddress()` returns a `FARPROC` (aka. `long long (*)()`) which is not compatible with `void *` per the specs. However, on Windows they are, so we silence the warning with a cast.
This commit is contained in:
committed by
GitHub
parent
1675d32261
commit
788128aec7
@@ -3052,7 +3052,7 @@ static void *dlsym_loaded(char *symbol)
|
||||
return addr;
|
||||
}
|
||||
# undef DL_FETCH_SYMBOL
|
||||
# define DL_FETCH_SYMBOL(h, s) (h == NULL ? dlsym_loaded(s) : GetProcAddress(h, s))
|
||||
# define DL_FETCH_SYMBOL(h, s) (h == NULL ? dlsym_loaded(s) : (void*) GetProcAddress(h, s))
|
||||
#endif
|
||||
|
||||
ZEND_METHOD(FFI, cdef) /* {{{ */
|
||||
|
||||
Reference in New Issue
Block a user