diff --git a/backend/tests/test_library.c b/backend/tests/test_library.c index db164a08..7a4fe08e 100644 --- a/backend/tests/test_library.c +++ b/backend/tests/test_library.c @@ -683,7 +683,7 @@ static void test_escape_char_process_test(const testCtx *const p_ctx) { symbol.symbology = data[i].symbology; symbol.input_mode = data[i].input_mode; - length = strlen(data[i].data); + length = (int) strlen(data[i].data); escaped_len = length; ret = escape_char_process_test(&symbol, (unsigned char *) data[i].data, &escaped_len, NULL); diff --git a/getopt/getopt.c b/getopt/getopt.c index 30199e9c..f3f1e441 100644 --- a/getopt/getopt.c +++ b/getopt/getopt.c @@ -197,7 +197,8 @@ static char *posixly_correct; whose names are inconsistent. */ #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 /* not __GNU_LIBRARY__ */ diff --git a/getopt/getopt.h b/getopt/getopt.h index cc45f46f..2a2c54ee 100644 --- a/getopt/getopt.h +++ b/getopt/getopt.h @@ -135,7 +135,8 @@ struct option arguments to the option '\0'. This behavior is specific to the GNU `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 differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */