1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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

View File

@@ -1526,11 +1526,12 @@ 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) {}
int main(void) {
void (*f)(void *) = (void (*)(void *))foo;
f("foo");
}
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],
[php_cv_ubsan_no_function=yes],