microsoft / microsoft/react-native-windows

Remove DisableSpecificWarnings suppressing C4996 for legacy APIs

Open
#15,535 0 comments 0 reactions 1 assignee View on GitHub

@iamAbhi-916 is already working on this.

Since Jan 12, 2026.

enhancement
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Ref : https://github.com/microsoft/react-native-windows/pull/15517
We're silencing the C4996 deprecation warnings because the deprecated headers are being pulled in transitively from upstream React Native's New Architecture code (react/runtime/ReactInstance.h → jsireact/JSIExecutor.h → legacy cxxreact headers.

it's upstream React Native that still includes these legacy headers. Until React Native completes their legacy removal, we can't fix these at the source.

RN use of legacy apis in 0.82, verify at ref : https://github.com/facebook/react-native/tree/9731e8ebc5ea87526a91b9903172639e062cd920/packages/react-native/ReactCommon/cxxreact

ReactCommon.vcxproj (Upstream RN cxxreact files)

  • cxxreact/ReactMarker.cpp
  • cxxreact/JSExecutor.cpp
  • cxxreact/Instance.cpp
  • cxxreact/NativeToJsBridge.cpp
  • cxxreact/JSIndexedRAMBundle.cpp
  • cxxreact/MethodCall.cpp
  • cxxreact/RAMBundleRegistry.cpp
  • cxxreact/ModuleRegistry.cpp
  • jsiexecutor/jsireact/JSIExecutor.cpp
  • jsiexecutor/jsireact/JSINativeModules.cpp

##Shared.vcxitems (RNW code with transitive dependencies)

  • Microsoft.ReactNative/ReactCoreInjection.cpp
  • Microsoft.ReactNative/ReactHost/CrashManager.cpp
  • Microsoft.ReactNative/ReactHost/MsoReactContext.cpp
  • Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp
  • react/renderer/core/EventQueueProcessor.cpp (upstream)
  • react/renderer/uimanager/UIManager.cpp (upstream)
  • react/runtime/ReactInstance.cpp (upstream)

Test Projects

  • Desktop.UnitTests/InstanceMocks.cpp
  • IntegrationTests/TestModule.cpp
  • Desktop.IntegrationTests/Modules/TestDevSettingsModule.cpp
  • Desktop.IntegrationTests/Modules/TestImageLoaderModule.cp

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.