소스 검색

CheckTypeSize: Fix with clang '-Werror,-Wmissing-variable-declarations'

Resolve issue building with missing variable declarations, error:

```
/src/cmake_clang/CMakeFiles/CheckTypeSize/CMAKE_SIZEOF_UNSIGNED_LONG.c:24:6: error: no previous extern declaration for non-static variable 'info_size' [-Werror,-Wmissing-variable-declarations]
char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
     ^
1 error generated.
```
Campbell Barton 6 년 전
부모
커밋
0adb0e0178
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Modules/CheckTypeSize.c.in

+ 1 - 1
Modules/CheckTypeSize.c.in

@@ -18,7 +18,7 @@
 #endif
 
 #define SIZE (sizeof(@type@))
-char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
+static char info_size[] =  {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
   ('0' + ((SIZE / 10000)%10)),
   ('0' + ((SIZE / 1000)%10)),
   ('0' + ((SIZE / 100)%10)),