Skip to content

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

@Yajur-Grover

Description

@Yajur-Grover

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions