testcommon: fix sizeof bug; AZTEC/QR: suppress cppcheck warnings (#233)

This commit is contained in:
gitlost
2021-07-06 12:13:34 +01:00
parent 9b02cd5221
commit 4d3aae45d0
13 changed files with 184 additions and 110 deletions

View File

@ -2796,7 +2796,7 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sgssep", strlen(bwipp_opts_buf) ? " " : "");
bwipp_opts = bwipp_opts_buf;
}
if (option_2 >= 1 && option_2 <= (int) sizeof(intsymbol)) {
if (option_2 >= 1 && option_2 <= ARRAY_SIZE(intsymbol)) {
int idx = intsymbol[option_2 - 1];
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%srows=%d columns=%d",
strlen(bwipp_opts_buf) ? " " : "", matrixH[idx], matrixW[idx]);