llvm-project/openmp/runtime/cmake
Jonas Hahnfeld f985f98128 [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
2018-07-30 18:16:22 +00:00
..
LibompCheckFortranFlag.cmake Re-indent the CMake refactor to two-space indention 2015-07-15 16:57:19 +00:00
LibompCheckLinkerFlag.cmake [CMake] Fix libomp_check_linker_flag function 2015-07-23 14:41:35 +00:00
LibompDefinitions.cmake Revert r273898's UNICODE quick fix in favor of CMake's remove_definitions() 2016-06-28 19:25:13 +00:00
LibompExports.cmake [OMPT] Purge OMPT_BLAME and OMPT_TRACE 2017-11-10 15:17:57 +00:00
LibompGetArchitecture.cmake Support of mips & mips64 for openmprtl 2016-12-08 09:22:24 +00:00
LibompHandleFlags.cmake [CMake] Disable -Wstringop-overflow 2018-07-30 18:16:22 +00:00
LibompMicroTests.cmake Support of mips & mips64 for openmprtl 2016-12-08 09:22:24 +00:00
LibompUtils.cmake Change source files from .c to .cpp 2016-12-14 22:39:11 +00:00
config-ix.cmake [CMake] Disable -Wstringop-overflow 2018-07-30 18:16:22 +00:00