[LTP] shmctl03: Fix 32-bit compat mode failure by adjusting comparisons for compat mode truncation

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Wed Aug 19 05:48:19 CEST 2026


Hi Wei,

On Aug 19, 2026, Wei Gao wrote:
> shmctl03: Fix 32-bit compat mode failure by adjusting comparisons for compat mode truncation

> #define TST_ASSERT_ULONG(path, val, ...) \
> 	tst_assert_ulong(__FILE__, __LINE__, path, val, (0, ##__VA_ARGS__))

Could this avoid the comma expression? When a flag is supplied, its left-hand
operand triggers -Wunused-value, so all three new compat-mode assertions emit
compiler warnings and builds using -Werror fail. Making the flags argument
explicit and passing 0 at no-flag call sites, or dispatching separate two- and
three-argument macro forms, would avoid the warning.

Verdict - Needs revision

---
Note:

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer


More information about the ltp mailing list