From b23f8ecd6988fd610e85a56ce5b8bf347b7718fd Mon Sep 17 00:00:00 2001 From: Alexander Sklar Date: Mon, 25 Jan 2021 21:45:10 -0800 Subject: [PATCH 1/4] Remove disabling 4018 4055 4146 4242 --- vnext/Folly/Folly.vcxproj | 2 +- vnext/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp | 3 --- vnext/Microsoft.ReactNative/Modules/TimingModule.cpp | 3 --- vnext/Microsoft.ReactNative/Modules/WebSocketModuleUwp.cpp | 3 --- vnext/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h | 1 - vnext/Mso/debugAssertApi/debugAssertApi.h | 3 +-- vnext/PropertySheets/Warnings.props | 3 +-- vnext/ReactCommon/ReactCommon.vcxproj | 2 +- vnext/Shared/DevSupportManager.cpp | 2 +- vnext/Shared/Executors/WebSocketJSExecutor.h | 3 --- vnext/Shared/Modules/NetworkingModule.cpp | 3 --- vnext/Shared/Modules/SourceCodeModule.h | 3 --- 12 files changed, 5 insertions(+), 26 deletions(-) diff --git a/vnext/Folly/Folly.vcxproj b/vnext/Folly/Folly.vcxproj index dd6b8bccc8c..1da41e48b13 100644 --- a/vnext/Folly/Folly.vcxproj +++ b/vnext/Folly/Folly.vcxproj @@ -250,7 +250,7 @@ $(ReactNativeWindowsDir)stubs;$(FollyDir);%(AdditionalIncludeDirectories) FOLLY_NO_CONFIG;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WINAPI_PARTITION_APP;%(PreprocessorDefinitions) - 4018;4146;4244;4251;4267;4293;4305;4800;4804;4310;%(DisableSpecificWarnings) + 4244;4251;4267;4293;4305;4800;4804;4310;%(DisableSpecificWarnings) /Zc:__cplusplus %(AdditionalOptions) diff --git a/vnext/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp b/vnext/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp index af868c06336..2956e811b1b 100644 --- a/vnext/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +++ b/vnext/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp @@ -8,11 +8,8 @@ #include "LinkingManagerModule.h" #include "Unicode.h" -#pragma warning(push) -#pragma warning(disable : 4146) #include #include -#pragma warning(pop) #if _MSC_VER <= 1913 // VC 19 (2015-2017.6) cannot optimize co_await/cppwinrt usage diff --git a/vnext/Microsoft.ReactNative/Modules/TimingModule.cpp b/vnext/Microsoft.ReactNative/Modules/TimingModule.cpp index f90baaf6dab..0bae572b9a1 100644 --- a/vnext/Microsoft.ReactNative/Modules/TimingModule.cpp +++ b/vnext/Microsoft.ReactNative/Modules/TimingModule.cpp @@ -13,10 +13,7 @@ #include #include -#pragma warning(push) -#pragma warning(disable : 4146) #include -#pragma warning(pop) #include diff --git a/vnext/Microsoft.ReactNative/Modules/WebSocketModuleUwp.cpp b/vnext/Microsoft.ReactNative/Modules/WebSocketModuleUwp.cpp index 2b7bd739e39..d5079d23676 100644 --- a/vnext/Microsoft.ReactNative/Modules/WebSocketModuleUwp.cpp +++ b/vnext/Microsoft.ReactNative/Modules/WebSocketModuleUwp.cpp @@ -14,11 +14,8 @@ #include "Unicode.h" #include "Utilities.h" -#pragma warning(push) -#pragma warning(disable : 4146) #include #include -#pragma warning(pop) #if _MSC_VER <= 1913 // VC 19 (2015-2017.6) cannot optimize co_await/cppwinrt usage diff --git a/vnext/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h b/vnext/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h index 497942509ef..1ca0306041a 100644 --- a/vnext/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h +++ b/vnext/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h @@ -11,7 +11,6 @@ #pragma warning(disable : 4995) #pragma warning(disable : 4068) -#pragma warning(disable : 4146) #pragma warning(disable : 4100) #pragma warning(disable : 4324) // structure was padded due to alignment specifier diff --git a/vnext/Mso/debugAssertApi/debugAssertApi.h b/vnext/Mso/debugAssertApi/debugAssertApi.h index 08eac5b29ef..af962441a64 100644 --- a/vnext/Mso/debugAssertApi/debugAssertApi.h +++ b/vnext/Mso/debugAssertApi/debugAssertApi.h @@ -61,7 +61,6 @@ if (FAssertDo(f)) { ... } // same as "if (f) { ... } else Assert(false);" /** Suppressed warnings in Assert macros: C4127 - if/while loop condition is a constant - C4018 - signed/unsigned compare was converted to unsigned/unsigned compare C4389 - operation involved signed/unsigned variables 6239 - OACR left expression is always false 25011 - OACR missing 'break' or '__fallthrough' statement @@ -74,7 +73,7 @@ Suppressed warnings in Assert macros: */ #define AssertDetails_Statement_Begin \ __pragma(warning(push)) \ - __pragma(warning(disable : 4127 4018 4389 6239 25037 25038 25039 25041 25042 25064 25306)) do { + __pragma(warning(disable : 4127 4389 6239 25037 25038 25039 25041 25042 25064 25306)) do { #define AssertDetails_Statement_End \ } \ while (0) \ diff --git a/vnext/PropertySheets/Warnings.props b/vnext/PropertySheets/Warnings.props index 737d83b18ea..01643d0d0b8 100644 --- a/vnext/PropertySheets/Warnings.props +++ b/vnext/PropertySheets/Warnings.props @@ -4,14 +4,13 @@ - 4146;4201;4505;4456;4458;4702 + 4201;4505;4456;4458;4702