Skip to content

Commit efe3b4b

Browse files
committed
tweak tests
1 parent bb5bf5b commit efe3b4b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

test/cfg/std.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,14 @@
3939
#include <stddef.h>
4040

4141
void test_int32_min() {
42+
// cppcheck-suppress shiftNegativeLHS
4243
// cppcheck-suppress shiftTooManyBits ; tests that INT32_MIN is a 32-bit expression (not 64-bit expression)
43-
int a = INT32_MIN >> 40;
44+
(void)(INT32_MIN >> 40);
4445
}
4546

4647
void test_int64_min() {
47-
char buf[10];
48-
49-
// cppcheck-suppress arrayIndexOutOfBounds ; tests that INT64_MIN is a signed expression
50-
buf[100 * (int)(INT64_MIN < 0)] = 0;
48+
// cppcheck-suppress compareValueOutOfTypeRangeError ; tests that INT64_MIN is a signed expression
49+
if (INT64_MIN < 0) {}
5150
}
5251

5352
size_t invalidFunctionArgStr_wcslen(void)

0 commit comments

Comments
 (0)