Description
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
Link to commit
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
Build Configuration
None
Activity