This is an automated email from the ASF dual-hosted git repository.
raiden00pl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 21b28a412 testing/ltp: silence -Wshift-count-overflow on -Werror builds
21b28a412 is described below
commit 21b28a4126ac1268c9f4d4f41b60247837e1158f
Author: xiaoxiang781216 <[email protected]>
AuthorDate: Wed May 13 18:36:26 2026 +0800
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 <[email protected]>
---
testing/ltp/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/testing/ltp/Makefile b/testing/ltp/Makefile
index c6f712614..39a7d931b 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),)