-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Add default case to facebook::react::displayModeToInt()
#48711
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
Conversation
|
Hi @Yajur-Grover! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
This pull request was successfully merged by @Yajur-Grover in 8c06f57 When will my fix make it into a release? | How to file a pick request? |
…8711) Summary: In the `displayModeToInt()` function, there is no default case defined which is causing the following warning in React Native Windows when trying to build on the New Architecture: ``` ##[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. Not sure if using the -1 value in this case is appropriate. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General] [Fixed] - Add default case to `displayModeToInt()` function Pull Request resolved: facebook#48711 Test Plan: Tested on React Native Windows New Arch application and was able to build successfully. Reviewed By: javache Differential Revision: D68265335 Pulled By: rshest fbshipit-source-id: 4724a4c7391b9bf651a122f5de227a0c5e0b6212
Summary:
In the
displayModeToInt()function, there is no default case defined which is causing the following warning in React Native Windows when trying to build on the New Architecture:Adding the default case removes the warning and resolves the issue. Not sure if using the -1 value in this case is appropriate.
Changelog:
[General] [Fixed] - Add default case to
displayModeToInt()functionTest Plan:
Tested on React Native Windows New Arch application and was able to build successfully.