From 8a11469b3144d1098500215252e1233cf40f059e Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Mon, 4 May 2026 02:04:40 +0800 Subject: [PATCH] build: Simplify __builtin_ctz check code Utilize that __builtin_ctz() has the same return type as main(). Signed-off-by: Kang-Che Sung --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 54ce38b55..51c9b99f7 100644 --- a/configure.ac +++ b/configure.ac @@ -352,7 +352,7 @@ AC_MSG_CHECKING(for __builtin_ctz) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [], - [[volatile int test_ctz = __builtin_ctz(1); (void)test_ctz; /* Supported in GCC 3.4 or later */]] + [[return __builtin_ctz(1U); /* Supported in GCC 3.4 or later */]] )], AC_DEFINE([HAVE_BUILTIN_CTZ], 1, [Define to 1 if the compiler supports '__builtin_ctz' function.]) AC_MSG_RESULT(yes),