فهرست منبع

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

Max Bruckner 8 سال پیش
والد
کامیت
bfbd8fe0d8
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 1 0
      CMakeLists.txt
  2. 2 2
      tests/parse_hex4.c

+ 1 - 0
CMakeLists.txt

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

+ 2 - 2
tests/parse_hex4.c

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