1
0
mirror of https://github.com/DaveGamble/cJSON synced 2025-04-26 05:07:55 +00:00

tests/parse_hex4: Fix GCC 7 compiler warning (fixes #179)

This commit is contained in:
Max Bruckner 2017-06-04 21:24:28 +02:00
parent 82295f9e4f
commit bfbd8fe0d8
2 changed files with 3 additions and 2 deletions

View File

@ -41,6 +41,7 @@ if (ENABLE_CUSTOM_COMPILER_FLAGS)
-Wcomma -Wcomma
-Wdouble-promotion -Wdouble-promotion
-Wparentheses -Wparentheses
-Wformat-overflow
) )
endif() endif()

View File

@ -31,8 +31,8 @@
static void parse_hex4_should_parse_all_combinations(void) static void parse_hex4_should_parse_all_combinations(void)
{ {
unsigned int number = 0; unsigned int number = 0;
unsigned char digits_lower[5]; unsigned char digits_lower[6];
unsigned char digits_upper[5]; unsigned char digits_upper[6];
/* test all combinations */ /* test all combinations */
for (number = 0; number <= 0xFFFF; number++) for (number = 0; number <= 0xFFFF; number++)
{ {