소스 검색

Add warning -Wmissing-variable-declarations

Max Bruckner 8 년 전
부모
커밋
4e0c119391
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      CMakeLists.txt
  2. 1 1
      tests/json_patch_tests.c

+ 1 - 0
CMakeLists.txt

@@ -43,6 +43,7 @@ if (ENABLE_CUSTOM_COMPILER_FLAGS)
         -Wparentheses
         -Wformat-overflow
         -Wunused-macros
+        -Wmissing-variable-declarations
         )
 endif()
 

+ 1 - 1
tests/json_patch_tests.c

@@ -119,7 +119,7 @@ static cJSON_bool test_apply_patch(const cJSON * const test)
     return successful;
 }
 
-static cJSON_bool test_generate_test(cJSON *test __attribute__((unused)))
+static cJSON_bool test_generate_test(cJSON *test)
 {
     cJSON *doc = NULL;
     cJSON *patch = NULL;