Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default case to facebook::react::displayModeToInt() #14281

Open
Yajur-Grover opened this issue Jan 15, 2025 · 1 comment · May be fixed by #14310
Open

Add default case to facebook::react::displayModeToInt() #14281

Yajur-Grover opened this issue Jan 15, 2025 · 1 comment · May be fixed by #14310

Comments

@Yajur-Grover
Copy link
Contributor

Yajur-Grover commented Jan 15, 2025

Problem Description

In the displayModeToInt() function, there is not default case defined which is causing the following warning:

##[error]node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): Error C2220: the following warning is treated as an error
D:\a\_work\1\s\node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): error C2220: the following warning is treated as an error [D:\a\_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
##[warning]node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): Warning C4715: 'facebook::react::displayModeToInt': not all control paths return a value
D:\a\_work\1\s\node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): warning C4715: 'facebook::react::displayModeToInt': not all control paths return a value [D:\a\_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]

Adding the default case removes the warning and resolves the issue.

Link to the integration where the error originated

#14278

Link to commit

facebook/react-native@dbb75e3

There was no change to the function in primitives.h directly in this integration period, but this was the only commit that references the function in the commit range.

Forked files

packages/react-native/ReactCommon/react/renderer/uimanager/primitives.h

Upstream PR

facebook/react-native#48711

Build Configuration

None

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Jan 15, 2025
@chrisglein chrisglein added enhancement and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Jan 27, 2025
@chrisglein
Copy link
Member

@Yajur-Grover is planning on addressing this with the next integration PR.

@chrisglein chrisglein added this to the Next milestone Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants