mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
test_library: suppress size_t -> int warning
getopt: suppress `-Wdeprecated-non-prototype` warnings
This commit is contained in:
parent
eb035a6372
commit
a1aefdc50b
@ -683,7 +683,7 @@ static void test_escape_char_process_test(const testCtx *const p_ctx) {
|
|||||||
|
|
||||||
symbol.symbology = data[i].symbology;
|
symbol.symbology = data[i].symbology;
|
||||||
symbol.input_mode = data[i].input_mode;
|
symbol.input_mode = data[i].input_mode;
|
||||||
length = strlen(data[i].data);
|
length = (int) strlen(data[i].data);
|
||||||
|
|
||||||
escaped_len = length;
|
escaped_len = length;
|
||||||
ret = escape_char_process_test(&symbol, (unsigned char *) data[i].data, &escaped_len, NULL);
|
ret = escape_char_process_test(&symbol, (unsigned char *) data[i].data, &escaped_len, NULL);
|
||||||
|
@ -197,7 +197,8 @@ static char *posixly_correct;
|
|||||||
whose names are inconsistent. */
|
whose names are inconsistent. */
|
||||||
|
|
||||||
#ifndef getenv
|
#ifndef getenv
|
||||||
extern char *getenv ();
|
/* zint: prototype it to avoid warning `-Wdeprecated-non-prototype` (will be error in C2x) */
|
||||||
|
extern char *getenv (const char *); /* was extern char *getenv (); */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* not __GNU_LIBRARY__ */
|
#endif /* not __GNU_LIBRARY__ */
|
||||||
|
@ -135,7 +135,8 @@ struct option
|
|||||||
arguments to the option '\0'. This behavior is specific to the GNU
|
arguments to the option '\0'. This behavior is specific to the GNU
|
||||||
`getopt'. */
|
`getopt'. */
|
||||||
|
|
||||||
#ifdef __GNU_LIBRARY__
|
/* zint: prototype it always to avoid warning `-Wdeprecated-non-prototype` (will be error in C2x) */
|
||||||
|
#ifdef 1 /* was __GNU_LIBRARY__ */
|
||||||
/* Many other libraries have conflicting prototypes for getopt, with
|
/* Many other libraries have conflicting prototypes for getopt, with
|
||||||
differences in the consts, in stdlib.h. To avoid compilation
|
differences in the consts, in stdlib.h. To avoid compilation
|
||||||
errors, only prototype getopt for the GNU C library. */
|
errors, only prototype getopt for the GNU C library. */
|
||||||
|
Loading…
Reference in New Issue
Block a user