Suppress some pedantic warnings, props codemonkey82 (#204)

This commit is contained in:
gitlost 2021-09-12 23:37:44 +01:00
parent f84f82d9a2
commit 9229634826
4 changed files with 12 additions and 6 deletions

View File

@ -10,11 +10,14 @@ Changes
------- -------
- RMQR: add ECI support - RMQR: add ECI support
- CODE93: don't display check characters in HRT (as per standard Figure B1) - CODE93: don't display check characters in HRT (as per standard Figure B1)
- GUI: separate out MAXICODE Structured Carrier Message fields
Bugs Bugs
---- ----
- GUI/CLI: fix dev version test - GUI/CLI: fix dev version test
- library.c: error_tag(): check error_number < ZINT_ERROR on WARN_FAIL_ALL - library.c: error_tag(): check error_number < ZINT_ERROR on WARN_FAIL_ALL
- vector.c: enforce minimum scale >= 0.1 and allow in GUI
- Suppress some pedantic warnings, props codemonkey82 (#204)
Version 2.10.0 2021-08-14 Version 2.10.0 2021-08-14

View File

@ -29,4 +29,7 @@ HRESULT DllGetVersion (DLLVERSIONINFO2* pdvi)
return S_OK; return S_OK;
} }
#else
/* https://stackoverflow.com/a/26541331/664741 Suppresses gcc warning ISO C forbids an empty translation unit */
typedef int make_iso_compilers_happy;
#endif /* _WIN32 */ #endif /* _WIN32 */

View File

@ -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. /* 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[] = { static const char c82[] = {
0, 1, -1, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, /*!-0*/ 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, -1, /*1-@*/ 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*/ 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*/ 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*/ 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); const unsigned char *de = d + (data_len > max ? max : data_len);
for (; d < de; d++) { for (; d < de; d++) {
if (*d < '!' || *d > 'z' || c82[*d - '!'] == -1) { if (*d < '!' || *d > 'z' || c82[*d - '!'] == 82) {
*p_err_no = 3; *p_err_no = 3;
*p_err_posn = d - data + 1; *p_err_posn = d - data + 1;
sprintf(err_msg, "Invalid CSET 82 character '%c'", *d); sprintf(err_msg, "Invalid CSET 82 character '%c'", *d);

View File

@ -94,7 +94,7 @@ INTERNAL int tif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
int samples_per_pixel; int samples_per_pixel;
int pixels_per_sample; int pixels_per_sample;
unsigned char map[128]; unsigned char map[128];
tiff_color_t color_map[256] = {0}; tiff_color_t color_map[256] = {{0}};
unsigned char palette[32][5]; unsigned char palette[32][5];
int color_map_size = 0; int color_map_size = 0;
int extra_samples = 0; int extra_samples = 0;