From 7c11841f5dbd53e3d3a53c3b43359a0d9ac9d07f Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Fri, 20 Jan 2023 12:23:12 +0200 Subject: [PATCH] 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 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1be82ef..e67084c 100644 --- a/CMakeLists.txt +++ b/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")