mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Autotools: Fix CS in undefined sanitizer check (#15892)
To prevent possible unused warnings turning into false errors.
This commit is contained in:
parent
d5b3ffa762
commit
796eba65e7
@ -1526,11 +1526,12 @@ AS_VAR_IF([PHP_UNDEFINED_SANITIZER], [yes],
|
|||||||
AC_CACHE_CHECK([whether to add -fno-sanitize=function],
|
AC_CACHE_CHECK([whether to add -fno-sanitize=function],
|
||||||
[php_cv_ubsan_no_function],
|
[php_cv_ubsan_no_function],
|
||||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||||
void foo(char *string) {}
|
void foo(char *string) { (void)string; }
|
||||||
int main(void) {
|
int main(void) {
|
||||||
void (*f)(void *) = (void (*)(void *))foo;
|
void (*f)(void *) = (void (*)(void *))foo;
|
||||||
f("foo");
|
f("foo");
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
])],
|
])],
|
||||||
[php_cv_ubsan_no_function=no],
|
[php_cv_ubsan_no_function=no],
|
||||||
[php_cv_ubsan_no_function=yes],
|
[php_cv_ubsan_no_function=yes],
|
||||||
|
Loading…
Reference in New Issue
Block a user