mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-09 13:41:59 -04:00
Suppress some pedantic warnings, props codemonkey82 (#204)
This commit is contained in:
parent
f84f82d9a2
commit
9229634826
4 changed files with 12 additions and 6 deletions
|
@ -68,12 +68,12 @@ static int numeric(const unsigned char *data, int data_len, int offset, int min,
|
|||
}
|
||||
|
||||
/* GS1 General Specifications 21.0.1 Figure 7.9.5-1. GS1 AI encodable character reference values.
|
||||
Also used to determine if character in set 82 */
|
||||
Also used to determine if character in set 82 - a value of 82 means not in */
|
||||
static const char c82[] = {
|
||||
0, 1, -1, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, /*!-0*/
|
||||
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, -1, /*1-@*/
|
||||
0, 1, 82, 82, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, /*!-0*/
|
||||
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 82, /*1-@*/
|
||||
29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, /*A-P*/
|
||||
45, 46, 47, 48, 49, 50, 51, 52, 53, 54, -1, -1, -1, -1, 55, -1, /*Q-`*/
|
||||
45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 82, 82, 82, 82, 55, 82, /*Q-`*/
|
||||
56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, /*a-p*/
|
||||
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, /*q-z*/
|
||||
};
|
||||
|
@ -93,7 +93,7 @@ static int cset82(const unsigned char *data, int data_len, int offset, int min,
|
|||
const unsigned char *de = d + (data_len > max ? max : data_len);
|
||||
|
||||
for (; d < de; d++) {
|
||||
if (*d < '!' || *d > 'z' || c82[*d - '!'] == -1) {
|
||||
if (*d < '!' || *d > 'z' || c82[*d - '!'] == 82) {
|
||||
*p_err_no = 3;
|
||||
*p_err_posn = d - data + 1;
|
||||
sprintf(err_msg, "Invalid CSET 82 character '%c'", *d);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue