mirror of
https://git.code.sf.net/p/zint/code
synced 2025-06-03 08:28:44 -04:00
CODE128: suppress cppcheck out-of-bounds warning; plus others (#233)
This commit is contained in:
parent
3e995c70fb
commit
f03da2f4ba
12 changed files with 49 additions and 47 deletions
|
@ -97,14 +97,14 @@ static void test_sjis_wctomb_zint(void) {
|
|||
ret = sjis_wctomb_zint(&val, i);
|
||||
ret2 = sjis_wctomb_zint2(&val2, i);
|
||||
if (i == 0xFF3C) { // Extra mapping full-width reverse solidus U+FF3C to 0x815F, duplicate of U+005C (backslash)
|
||||
assert_equal(ret, 2, "i:%d 0x%04X ret %d != 2, val 0x%04X\n", i, i, ret, val);
|
||||
assert_equal(val, 0x815F, "i:%d 0x%04X val 0x%04X != 0x815F\n", i, i, val);
|
||||
assert_zero(ret2, "i:%d 0x%04X ret2 %d != 0, val2 0x%04X\n", i, i, ret2, val2);
|
||||
assert_equal(ret, 2, "i:%d 0x%04X ret %d != 2, val 0x%04X\n", (int) i, i, ret, val);
|
||||
assert_equal(val, 0x815F, "i:%d 0x%04X val 0x%04X != 0x815F\n", (int) i, i, val);
|
||||
assert_zero(ret2, "i:%d 0x%04X ret2 %d != 0, val2 0x%04X\n", (int) i, i, ret2, val2);
|
||||
} else {
|
||||
assert_equal(ret, ret2, "i:%d 0x%04X ret %d != ret2 %d, val 0x%04X, val2 0x%04X\n", i, i, ret, ret2, val, val2);
|
||||
assert_equal(ret, ret2, "i:%d 0x%04X ret %d != ret2 %d, val 0x%04X, val2 0x%04X\n", (int) i, i, ret, ret2, val, val2);
|
||||
}
|
||||
if (ret2) {
|
||||
assert_equal(val, val2, "i:%d 0x%04X val 0x%04X != val2 0x%04X\n", i, i, val, val2);
|
||||
assert_equal(val, val2, "i:%d 0x%04X val 0x%04X != val2 0x%04X\n", (int) i, i, val, val2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue