Commit 0db7367
Add missing default cases
Summary:
**Context:** https://fburl.com/switch-enum
----
Now that `-Wswitch-enum` is an error in all of `fbobjc`, making it such that all enum values need a case within a switch regardless of having a default case, we want to also enable `-Wswitch-default` as an error (ensuring we cover all values outside the given enum's values). This will reduce SEVs as it will eliminate undefined behavior when a value outside the enum range is switched upon.
Differential Revision: D87663451
fbshipit-source-id: 3eee5dfe84462b9c8deaa35d79c2ecd2027ce8a51 parent f6eb169 commit 0db7367
2 files changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
949 | 952 | | |
950 | 953 | | |
951 | 954 | | |
| |||
1046 | 1049 | | |
1047 | 1050 | | |
1048 | 1051 | | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
1049 | 1055 | | |
1050 | 1056 | | |
1051 | 1057 | | |
| |||
1110 | 1116 | | |
1111 | 1117 | | |
1112 | 1118 | | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
1113 | 1122 | | |
1114 | 1123 | | |
1115 | 1124 | | |
| |||
1234 | 1243 | | |
1235 | 1244 | | |
1236 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
1237 | 1249 | | |
1238 | 1250 | | |
1239 | 1251 | | |
| |||
1283 | 1295 | | |
1284 | 1296 | | |
1285 | 1297 | | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
1286 | 1301 | | |
1287 | 1302 | | |
1288 | 1303 | | |
| |||
1630 | 1645 | | |
1631 | 1646 | | |
1632 | 1647 | | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
1633 | 1651 | | |
1634 | 1652 | | |
1635 | 1653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1474 | 1474 | | |
1475 | 1475 | | |
1476 | 1476 | | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1477 | 1480 | | |
1478 | 1481 | | |
1479 | 1482 | | |
| |||
1513 | 1516 | | |
1514 | 1517 | | |
1515 | 1518 | | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
1516 | 1522 | | |
1517 | 1523 | | |
1518 | 1524 | | |
| |||
1561 | 1567 | | |
1562 | 1568 | | |
1563 | 1569 | | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
1564 | 1573 | | |
1565 | 1574 | | |
1566 | 1575 | | |
| |||
1600 | 1609 | | |
1601 | 1610 | | |
1602 | 1611 | | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
1603 | 1615 | | |
1604 | 1616 | | |
1605 | 1617 | | |
| |||
0 commit comments