diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-18 12:47:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-03-18 15:56:39 (GMT) |
commit | 0adb0e01784ab114efeb2bf24df9c40be706cf01 (patch) | |
tree | c7c4a053893020466320b4bd066de2138817bae6 /Modules | |
parent | b06f8c93e5bc65394fe55b3f7ae923fe296048b3 (diff) | |
download | CMake-0adb0e01784ab114efeb2bf24df9c40be706cf01.zip CMake-0adb0e01784ab114efeb2bf24df9c40be706cf01.tar.gz CMake-0adb0e01784ab114efeb2bf24df9c40be706cf01.tar.bz2 |
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.
```
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CheckTypeSize.c.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CheckTypeSize.c.in b/Modules/CheckTypeSize.c.in index 2303c4e..82035a3 100644 --- a/Modules/CheckTypeSize.c.in +++ b/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)), |