Commit 86b0ecb
Fix -Wswitch-enum errors in FBAMRestorableDevice.m
Summary:
Latest stables are blocked https://www.internalfb.com/shipyard/stable/fbobjc_stable/overview?session_id=1254665563091619 as a result of the enablement of We enabling [-Wswitch-enum for all Apple targets](https://fb.workplace.com/groups/mobile.sheriffs/permalink/29958097777145452/)
Add explicit handling for `AMRestorableDeviceStateUnknown` in two switch statements in `FBAMRestorableDevice.m` to resolve compilation errors.
The compiler with `-Werror,-Wswitch-enum` requires all enumeration values to be explicitly handled in switch statements. The `AMRestorableDeviceStateUnknown` case was missing from:
1. The `state` method at line 57
2. The `targetStateForDeviceState:` method at line 133
Both now explicitly handle the unknown state by returning `FBiOSTargetStateUnknown`.
Differential Revision:
D86477448
Privacy Context Container: L1246528
fbshipit-source-id: dbf49ad192db331e532352f439b4631a3a83d1b11 parent f7663f0 commit 86b0ecb
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| 144 | + | |
| 145 | + | |
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| |||
0 commit comments