Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Remove disabling 4018 4055 4146 4242",
"packageName": "react-native-windows",
"email": "asklar@microsoft.com",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion vnext/Folly/Folly.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
<AdditionalIncludeDirectories>$(ReactNativeWindowsDir)stubs;$(FollyDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>FOLLY_NO_CONFIG;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WINAPI_PARTITION_APP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ForcedUsingFiles />
<DisableSpecificWarnings>4018;4146;4244;4251;4267;4293;4305;4800;4804;4310;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4244;4251;4267;4293;4305;4800;4804;4310;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
Expand Down
3 changes: 0 additions & 3 deletions vnext/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
#include "LinkingManagerModule.h"
#include "Unicode.h"

#pragma warning(push)
#pragma warning(disable : 4146)
#include <cxxreact/Instance.h>
#include <cxxreact/JsArgumentHelpers.h>
#pragma warning(pop)

#if _MSC_VER <= 1913
// VC 19 (2015-2017.6) cannot optimize co_await/cppwinrt usage
Expand Down
3 changes: 0 additions & 3 deletions vnext/Microsoft.ReactNative/Modules/TimingModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
#include <cxxreact/CxxModule.h>
#include <cxxreact/Instance.h>

#pragma warning(push)
#pragma warning(disable : 4146)
#include <cxxreact/JsArgumentHelpers.h>
#pragma warning(pop)

#include <unknwnbase.h>

Expand Down
3 changes: 0 additions & 3 deletions vnext/Microsoft.ReactNative/Modules/WebSocketModuleUwp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
#include "Unicode.h"
#include "Utilities.h"

#pragma warning(push)
#pragma warning(disable : 4146)
#include <cxxreact/Instance.h>
#include <cxxreact/JsArgumentHelpers.h>
#pragma warning(pop)

#if _MSC_VER <= 1913
// VC 19 (2015-2017.6) cannot optimize co_await/cppwinrt usage
Expand Down
2 changes: 0 additions & 2 deletions vnext/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

#pragma warning(push)

#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

Expand Down
3 changes: 0 additions & 3 deletions vnext/Microsoft.ReactNative/Utils/ValueUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
#include <folly/dynamic.h>
#include <iomanip>

#pragma warning(push)
#pragma warning(disable : 4995)
#include <locale>
#pragma warning(pop)

namespace winrt {
using namespace Windows::Foundation;
Expand Down
6 changes: 0 additions & 6 deletions vnext/Mso/comUtil/qiCastCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ Mso::CntPtr<TTarget> qi_cast(const TSource *piSource, const IID &riid = __uuidof
return qi_cast<TTarget, TSource *>(piSourceNonConst, riid);
}

#pragma warning(push)
#pragma warning(disable : 4995) // VerifyElseCrashSz gives "warning C4995: 'IsDebuggerPresent': name was marked as
// #pragma deprecated"

/**
qi_cast_or_crash<Type>(source, optional riid)

Expand All @@ -92,8 +88,6 @@ Mso::CntPtr<TTarget> qi_cast_or_crash(const TSource *piSource, const IID &riid =
return target;
}

#pragma warning(pop)

/**
simpleqi_cast<Type>(source, optional riid)

Expand Down
4 changes: 1 addition & 3 deletions vnext/Mso/debugAssertApi/debugAssertApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -73,8 +72,7 @@ Suppressed warnings in Assert macros:
25064 - OACR function called twice in macro
*/
#define AssertDetails_Statement_Begin \
__pragma(warning(push)) \
__pragma(warning(disable : 4127 4018 4389 6239 25037 25038 25039 25041 25042 25064 25306)) do {
__pragma(warning(push)) __pragma(warning(disable : 4127 4389 6239 25037 25038 25039 25041 25042 25064 25306)) do {
#define AssertDetails_Statement_End \
} \
while (0) \
Expand Down
2 changes: 0 additions & 2 deletions vnext/Mso/object/queryCast.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ Here we provide a number of helper templates to implement QueryCast for a type:
// inaccessible or deleted
#pragma warning(disable : 4626) // assignment operator could not be generated because a base class assignment operator
// is inaccessible or deleted
#pragma warning(disable : 4995) // 'IsDebuggerPresent': name was marked as #pragma deprecated. It is part of
// VerifyElseCrash macro.

namespace Mso {

Expand Down
3 changes: 1 addition & 2 deletions vnext/PropertySheets/Warnings.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
<PropertyGroup>
<!-- Office pre-disabled warnings -->
<!--
C4146 - unary minus operator applied to unsigned type, result still unsigned
C4201 - nonstandard extension used : nameless struct/union
C4505 - 'function' : unreferenced local function has been removed
C4456 - declaration of 'identifier' hides previous local declaration
C4458 - declaration of 'identifier' hides class member
C4702 - unreachable code
-->
<OfficePreDisabledWarnings>4146;4201;4505;4456;4458;4702</OfficePreDisabledWarnings>
<OfficePreDisabledWarnings>4201;4505;4456;4458;4702</OfficePreDisabledWarnings>
<!--
The following list matches the list in ..\make.inc
C4068 - unknown pragma
Expand Down
2 changes: 1 addition & 1 deletion vnext/ReactCommon/ReactCommon.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_WIN32;_CRT_SECURE_NO_WARNINGS;FOLLY_NO_CONFIG;NOMINMAX;RN_EXPORT=;JSI_EXPORT=;WIN32;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ForcedUsingFiles />
<DisableSpecificWarnings>4715;4146;4251;4800;4804;4305;4722;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<DisableSpecificWarnings>4715;4251;4800;4804;4305;4722;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<PreprocessToFile>false</PreprocessToFile>
</ClCompile>
<Link>
Expand Down
2 changes: 1 addition & 1 deletion vnext/Shared/DevSupportManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <winrt/Windows.Web.Http.h>

#pragma warning(push)
#pragma warning(disable : 4146 4244 4068 4251 4101 4267 4804 4309)
#pragma warning(disable : 4244 4068 4251 4101 4267 4804 4309)
#include <cxxreact/JSExecutor.h>
#include <cxxreact/MessageQueueThread.h>
#pragma warning(pop)
Expand Down
3 changes: 0 additions & 3 deletions vnext/Shared/Executors/WebSocketJSExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@

#pragma once

#pragma warning(push)
#pragma warning(disable : 4146)
#include <DevServerHelper.h>
#include <cxxreact/JSExecutor.h>
#include <cxxreact/JSModulesUnbundle.h>
#include <cxxreact/MessageQueueThread.h>
#pragma warning(pop)

#include <WebSocketJSExecutorFactory.h>

Expand Down
3 changes: 0 additions & 3 deletions vnext/Shared/Modules/NetworkingModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@
#include "Unicode.h"
#include "Utilities.h"

#pragma warning(push)
#pragma warning(disable : 4146)
#include <cxxreact/Instance.h>
#include <cxxreact/JsArgumentHelpers.h>
#pragma warning(pop)

#if _MSC_VER <= 1913
// VC 19 (2015-2017.6) cannot optimize co_await/cppwinrt usage
Expand Down
3 changes: 0 additions & 3 deletions vnext/Shared/Modules/SourceCodeModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@

#pragma once

#pragma warning(push)
#pragma warning(disable : 4146)
#include <cxxreact/CxxModule.h>
#pragma warning(pop)

#include <folly/dynamic.h>

Expand Down