diff options
author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2018-07-30 18:16:22 +0000 |
---|---|---|
committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2018-07-30 18:16:22 +0000 |
commit | f985f9812847628a107d72b6a8e38a6b0720c706 (patch) | |
tree | c39e9d09fb742002eaf5549a2ac9766e7347fbb9 /clang/lib/Basic/Module.cpp | |
parent | 91c89c5e2c069c1a8aeb76bb545be3a405c87c5e (diff) | |
download | llvm-f985f9812847628a107d72b6a8e38a6b0720c706.zip llvm-f985f9812847628a107d72b6a8e38a6b0720c706.tar.gz llvm-f985f9812847628a107d72b6a8e38a6b0720c706.tar.bz2 |
[CMake] Disable -Wstringop-overflow
GCC 8 produces false-positives with this:
In file included from <openmp>/src/runtime/src/kmp_os.h:950,
from <openmp>/src/runtime/src/kmp.h:78,
from <openmp>/src/runtime/src/kmp_environment.cpp:54:
<openmp>/src/runtime/src/kmp_environment.cpp: In function ‘char* __kmp_env_get(const char*)’:
<openmp>/src/runtime/src/kmp_safe_c_api.h:52:50: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
#define KMP_STRNCPY_S(dst, bsz, src, cnt) strncpy(dst, src, cnt)
~~~~~~~^~~~~~~~~~~~~~~
<openmp>/src/runtime/src/kmp_environment.cpp:97:5: note: in expansion of macro ‘KMP_STRNCPY_S’
KMP_STRNCPY_S(result, len, value, len);
^~~~~~~~~~~~~
<openmp>/src/runtime/src/kmp_environment.cpp:92:28: note: length computed here
size_t len = KMP_STRLEN(value) + 1;
This is stupid because result is allocated with KMP_INTERNAL_MALLOC(len),
so the arguments are correct.
Differential Revision: https://reviews.llvm.org/D49904
llvm-svn: 338283
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
0 files changed, 0 insertions, 0 deletions