Commit Graph
1 Commits
Author SHA1 Message Date
Jon ThysellandFacebook GitHub Bot c30e35fb44 Fix "C4715 not all control paths return a value" warning in MSVC (#45827)
Summary:
When integrating react-native into react-native-windows, we got the following build warning (which we treat as an error) when building ReactCommon: `C4715 not all control paths return a value`

This PR adds defaults to the switches to make sure every path returns a value.

See https://github.com/microsoft/react-native-windows/issues/13516

## Changelog:

[GENERAL] [FIXED] Fix "C4715 not all control paths return a value" warning in MSVC when building ReactCommon

Pull Request resolved: https://github.com/facebook/react-native/pull/45827

Test Plan: The switches are checking enums this code should never be hit unless new enum values are added.

Reviewed By: robhogan

Differential Revision: D61103286

Pulled By: NickGerleman

fbshipit-source-id: 2028cb60e0b438b9ac17a828f5e1b690052a0bec
2024-08-12 10:00:24 -07:00