From 61e7848f5e3088376764a6676a2fc90d0ea326d6 Mon Sep 17 00:00:00 2001 From: xiaoxiang781216 Date: Wed, 13 May 2026 18:36:26 +0800 Subject: [PATCH] testing/ltp: silence -Wshift-count-overflow on -Werror builds The LTP open_posix_testsuite header timespec.h has, since 2019: #define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1) When time_t is 64 bits (the default after sched/remove-system-time64), the shift reaches the sign bit of the underlying type and toolchains emit -Wshift-count-overflow, which the LTP build promotes to a hard error via -Werror. This breaks rv-virt/citest and rv-virt/citest64 on CI. The diagnostic is benign here (TIME_T_MAX itself is correct) and the defect is in upstream LTP, so disable the warning alongside the other 'should be removed in the future' relaxations until upstream is fixed. Signed-off-by: xiaoxiang781216 --- testing/ltp/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/testing/ltp/Makefile b/testing/ltp/Makefile index c6f712614dc..39a7d931b94 100644 --- a/testing/ltp/Makefile +++ b/testing/ltp/Makefile @@ -238,6 +238,7 @@ CFLAGS += -Wno-int-conversion -Wno-shadow # Should be removed if possible in the future CFLAGS += -Wno-incompatible-pointer-types -Wno-overflow -Wno-int-to-pointer-cast +CFLAGS += -Wno-shift-count-overflow # Specific compilation errors ignored in MacOS platform ifneq ($(CONFIG_HOST_MACOS),)