[EXT2FS][REISERFS] VSSolution: Actually disable C4189 errors (#540)
authorSerge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
Tue, 5 Jun 2018 18:16:22 +0000 (20:16 +0200)
committerThomas Faber <18138474+ThFabba@users.noreply.github.com>
Tue, 5 Jun 2018 18:16:22 +0000 (20:16 +0200)
Multiple "error C4189: '[...]': local variable is initialized but not referenced".

Thanks to Yuntian Zhang, who hinted at this in CORE-11836.

CORE-11280

drivers/filesystems/ext2/CMakeLists.txt
drivers/filesystems/reiserfs/CMakeLists.txt

index 94b077b..864962d 100644 (file)
@@ -94,8 +94,8 @@ endif()
 
 if(MSVC AND (NOT USE_CLANG_CL))
     # Disable warnings: "unreferenced local variable", "initialized, but not used variable", "benign include"
 
 if(MSVC AND (NOT USE_CLANG_CL))
     # Disable warnings: "unreferenced local variable", "initialized, but not used variable", "benign include"
-    replace_compile_flags("/we\"4189\"" " ")
-    add_target_compile_flags(ext2fs "/wd\"4189\" /wd\"4142\" /wd\"4101\"")
+    replace_compile_flags("/we4189" " ")
+    add_target_compile_flags(ext2fs "/wd4189 /wd4142 /wd4101")
 else()
     add_target_compile_flags(ext2fs "-Wno-pointer-sign -Wno-unused-function")
     add_target_compile_flags(ext2fs "-Wno-unused-variable -Wno-missing-braces")
 else()
     add_target_compile_flags(ext2fs "-Wno-pointer-sign -Wno-unused-function")
     add_target_compile_flags(ext2fs "-Wno-unused-variable -Wno-missing-braces")
index 95d70ea..9bbfe37 100644 (file)
@@ -86,8 +86,8 @@ if(USE_CLANG_CL OR (NOT MSVC))
     endif()
 else()
     #disable warnings: "unreferenced local variable", "initialized, but not used variable", "benign include"
     endif()
 else()
     #disable warnings: "unreferenced local variable", "initialized, but not used variable", "benign include"
-    replace_compile_flags("/we\"4189\"" " ")
-    add_target_compile_flags(reiserfs "/wd\"4189\" /wd\"4142\" /wd\"4101\"")
+    replace_compile_flags("/we4189" " ")
+    add_target_compile_flags(reiserfs "/wd4189 /wd4142 /wd4101")
 endif()
 
 target_link_libraries(reiserfs memcmp ${PSEH_LIB})
 endif()
 
 target_link_libraries(reiserfs memcmp ${PSEH_LIB})