From 6a657865ebe0a435d4ab5ddcaa7b52722acf3a32 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Sun, 1 May 2022 18:15:32 +0200 Subject: [PATCH] posix.cfg: Improved test cases for ffs(). --- test/cfg/posix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/cfg/posix.c b/test/cfg/posix.c index 6b2d13fb4..07010c84b 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -38,7 +38,9 @@ void knownConditionTrueFalse_ffs(int i) // ffs() returns the position of the first bit set, or 0 if no bits are set in i. const int x = ffs(0); // cppcheck-suppress knownConditionTrueFalse - if (x == 0) {} + if (x == 0) {} // always true + // cppcheck-suppress knownConditionTrueFalse + if (x == 1) {} // always false if (ffs(i) == 0) {} }