Autotools: Fix CS in undefined sanitizer check (#15892)

To prevent possible unused warnings turning into false errors.
This commit is contained in:
Peter Kokot 2024-09-15 15:52:37 +02:00 committed by GitHub
parent d5b3ffa762
commit 796eba65e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1526,10 +1526,11 @@ AS_VAR_IF([PHP_UNDEFINED_SANITIZER], [yes],
AC_CACHE_CHECK([whether to add -fno-sanitize=function],
[php_cv_ubsan_no_function],
[AC_RUN_IFELSE([AC_LANG_SOURCE([
void foo(char *string) {}
void foo(char *string) { (void)string; }
int main(void) {
void (*f)(void *) = (void (*)(void *))foo;
f("foo");
return 0;
}
])],
[php_cv_ubsan_no_function=no],