From 6c7b75c69ae1936ea642d233fe03adf1d9bdcf62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=B6ftner?= Date: Thu, 30 Apr 2026 16:55:22 +0200 Subject: [PATCH] prevent cppcheck from complaining about check for arithmetic right shift --- src/hal/hal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hal/hal.h b/src/hal/hal.h index 4f85421db10..2da0d2ced6b 100644 --- a/src/hal/hal.h +++ b/src/hal/hal.h @@ -1067,7 +1067,10 @@ static inline rtapi_s64 hal_extend_counter(rtapi_s64 old, rtapi_s64 newlow, int */ /* tripwire if somebody tries to use this code on a Cray with wrong - compiler flags */ + compiler flags. */ + + /* prevent cppcheck to complain about the tripwire */ + /* cppcheck-suppress shiftNegativeLHS */ HAL_STATIC_ASSERT((-2 >> 1) == -1, "hal_extend_counter impl only works with arithmetic right shift");