https://git.reactos.org/?p=reactos.git;a=commitdiff;h=80296be1ebd94710a46b0…
commit 80296be1ebd94710a46b0d1963e69bffaa6557b4
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Mon Feb 24 12:36:05 2020 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Mon Feb 24 22:29:33 2020 +0100
[CMAKE] When disabling C4101, explicitly remove the error flag.
Fixes VC2010 build.
Addendum to 11ecf5c969b.
---
dll/3rdparty/libtirpc/CMakeLists.txt | 1 +
drivers/filesystems/ext2/CMakeLists.txt | 1 +
drivers/filesystems/reiserfs/CMakeLists.txt | 1 +
sdk/lib/3rdparty/libxml2/CMakeLists.txt | 3 ++-
4 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dll/3rdparty/libtirpc/CMakeLists.txt b/dll/3rdparty/libtirpc/CMakeLists.txt
index 1cadd650861..128fccc7a05 100644
--- a/dll/3rdparty/libtirpc/CMakeLists.txt
+++ b/dll/3rdparty/libtirpc/CMakeLists.txt
@@ -102,6 +102,7 @@ add_library(libtirpc MODULE
${CMAKE_CURRENT_BINARY_DIR}/libtirpc.def)
if(MSVC AND (NOT USE_CLANG_CL))
+ replace_compile_flags("/we4101" " ")
add_target_compile_flags(libtirpc "/wd4101 /wd4133 /wd4473 /wd4477")
else()
# FIXME: Tons of warnings.
diff --git a/drivers/filesystems/ext2/CMakeLists.txt
b/drivers/filesystems/ext2/CMakeLists.txt
index f5bb339ca9e..13c6960e73b 100644
--- a/drivers/filesystems/ext2/CMakeLists.txt
+++ b/drivers/filesystems/ext2/CMakeLists.txt
@@ -94,6 +94,7 @@ endif()
if(MSVC AND (NOT USE_CLANG_CL))
# Disable warnings: "unreferenced local variable", "initialized, but
not used variable", "benign include"
+ replace_compile_flags("/we4101" " ")
replace_compile_flags("/we4189" " ")
add_target_compile_flags(ext2fs "/wd4189 /wd4142 /wd4101")
else()
diff --git a/drivers/filesystems/reiserfs/CMakeLists.txt
b/drivers/filesystems/reiserfs/CMakeLists.txt
index e9e4603f3c5..51d1cddc462 100644
--- a/drivers/filesystems/reiserfs/CMakeLists.txt
+++ b/drivers/filesystems/reiserfs/CMakeLists.txt
@@ -86,6 +86,7 @@ if(USE_CLANG_CL OR (NOT MSVC))
endif()
else()
#disable warnings: "unreferenced local variable", "initialized, but
not used variable", "benign include"
+ replace_compile_flags("/we4101" " ")
replace_compile_flags("/we4189" " ")
add_target_compile_flags(reiserfs "/wd4189 /wd4142 /wd4101")
endif()
diff --git a/sdk/lib/3rdparty/libxml2/CMakeLists.txt
b/sdk/lib/3rdparty/libxml2/CMakeLists.txt
index 033afe6d1ad..cbf577fc7d6 100644
--- a/sdk/lib/3rdparty/libxml2/CMakeLists.txt
+++ b/sdk/lib/3rdparty/libxml2/CMakeLists.txt
@@ -65,7 +65,8 @@ list(APPEND SOURCE
add_library(libxml2 ${SOURCE})
if(MSVC AND (NOT USE_CLANG_CL))
- # Formal parameter different from declaration
+ # Unreferenced local variable
+ replace_compile_flags("/we4101" " ")
add_target_compile_flags(libxml2 "/wd4101")
# Local variable initialized but not referenced
replace_compile_flags("/we4189" " ")