Commit 0a0ce0d
x86/bugs: Remove default case for fully switched enums
For enum switch statements which handle all possible cases, remove the
default case so a compiler warning gets printed if one of the enums gets
accidentally omitted from the switch statement.
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/fcf6feefab991b72e411c2aed688b18e65e06aed.1693889988.git.jpoimboe@kernel.org1 parent 55ca901 commit 0a0ce0d
1 file changed
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
1022 | | - | |
1023 | 1022 | | |
1024 | 1023 | | |
1025 | 1024 | | |
| |||
1290 | 1289 | | |
1291 | 1290 | | |
1292 | 1291 | | |
| 1292 | + | |
| 1293 | + | |
1293 | 1294 | | |
1294 | 1295 | | |
1295 | 1296 | | |
| |||
1301 | 1302 | | |
1302 | 1303 | | |
1303 | 1304 | | |
1304 | | - | |
1305 | | - | |
1306 | 1305 | | |
1307 | 1306 | | |
1308 | 1307 | | |
| |||
2160 | 2159 | | |
2161 | 2160 | | |
2162 | 2161 | | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
2163 | 2166 | | |
2164 | 2167 | | |
2165 | 2168 | | |
| |||
2171 | 2174 | | |
2172 | 2175 | | |
2173 | 2176 | | |
2174 | | - | |
2175 | | - | |
2176 | | - | |
2177 | | - | |
2178 | 2177 | | |
| 2178 | + | |
2179 | 2179 | | |
2180 | 2180 | | |
2181 | 2181 | | |
| |||
2504 | 2504 | | |
2505 | 2505 | | |
2506 | 2506 | | |
2507 | | - | |
2508 | | - | |
2509 | | - | |
2510 | 2507 | | |
2511 | 2508 | | |
2512 | 2509 | | |
| |||
0 commit comments