Browse Source

Suppress certain warnings

We have tons of warnings like

  warning C4244: '=': conversion from 'DWORD' to 'LANGID', possible loss of data
  warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
  warning C4996: 'wcsncpy': This function or variable may be unsafe

We should fix those at some point, but meanwhile let's suppress those since they
pollute build logs and make it very hard to analyse.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
pull/591/head
Lev Stipakov 2 years ago committed by Selva Nair
parent
commit
7c11841f5d
  1. 4
      CMakeLists.txt

4
CMakeLists.txt

@ -36,10 +36,10 @@ find_package(OpenSSL REQUIRED)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf /Qspectre")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /guard:cf /DYNAMICBASE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qspectre")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4267 /wd4244")
if(NOT (${CMAKE_C_COMPILER_ARCHITECTURE_ID} STREQUAL "ARM64"))
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /CETCOMPAT")

Loading…
Cancel
Save