Skip to content

Commit 796eba6

Browse files
authored
Autotools: Fix CS in undefined sanitizer check (php#15892)
To prevent possible unused warnings turning into false errors.
1 parent d5b3ffa commit 796eba6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

configure.ac

+6-5
Original file line numberDiff line numberDiff line change
@@ -1526,11 +1526,12 @@ AS_VAR_IF([PHP_UNDEFINED_SANITIZER], [yes],
15261526
AC_CACHE_CHECK([whether to add -fno-sanitize=function],
15271527
[php_cv_ubsan_no_function],
15281528
[AC_RUN_IFELSE([AC_LANG_SOURCE([
1529-
void foo(char *string) {}
1530-
int main(void) {
1531-
void (*f)(void *) = (void (*)(void *))foo;
1532-
f("foo");
1533-
}
1529+
void foo(char *string) { (void)string; }
1530+
int main(void) {
1531+
void (*f)(void *) = (void (*)(void *))foo;
1532+
f("foo");
1533+
return 0;
1534+
}
15341535
])],
15351536
[php_cv_ubsan_no_function=no],
15361537
[php_cv_ubsan_no_function=yes],

0 commit comments

Comments
 (0)