Repository navigation
Commit a90db24
authored
Fix
Summary:
D127334907 enables `-Wunreachable-code-break` through the PACKAGE files of `fbcode/example`, `fbcode/excalibur`, `fbcode/executorch`, `fbcode/experience-ai`, `xplat/executorch`. This diff fixes the code that warning flags there, so the PACKAGE change builds cleanly on top of it.
Fixes the new warning in executorch (fbcode side edited; the `xplat/executorch` dirsync mirror is identical): removes `break;` statements that can never run because the preceding statement always leaves the case. In `devtools/bundled_program/bundled_program.cpp` they follow `ET_CHECK_OR_RETURN_ERROR(false, ...)` (always returns) or `return`; in `extension/fb/ptez/ptez_data_loader.cpp` and `runtime/executor/method_meta.cpp` (`get_tag`) they follow `return`; in `backends/vulkan/runtime/vk_api/Pipeline.cpp` (`vk_layout`) the inner `switch` returns on every path. Behavior is unchanged.
Removes unreachable `break;` statements in Vulkan test and tool code (fbcode side edited; the `xplat/executorch` mirror is identical): `backends/vulkan/test/utils/test_utils.cpp` (after `throw`), `backends/vulkan/test/vulkan_compute_api_test.cpp` (after an inner `switch` that returns on every path), and `backends/vulkan/fb/tools/cli/{benchmark,correctness}/optparser.cpp` (after `exit(1)`).
Reviewed By: dtolnay
Differential Revision: D127368223
Pull Request resolved: pytorch#24155-Wunreachable-code-break findings in fbcode/executorch, xplat/executorch
1 parent 5b14a2f commit a90db24
5 files changed
Lines changed: 6 additions & 12 deletions
File tree
- backends/vulkan
- runtime/vk_api
- test
- utils
- devtools/bundled_program
- runtime/executor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | 343 | | |
345 | 344 | | |
346 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
296 | 295 | | |
297 | 296 | | |
298 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
342 | 341 | | |
343 | 342 | | |
344 | 343 | | |
| |||
450 | 449 | | |
451 | 450 | | |
452 | 451 | | |
453 | | - | |
454 | 452 | | |
455 | 453 | | |
456 | 454 | | |
| |||
532 | 530 | | |
533 | 531 | | |
534 | 532 | | |
535 | | - | |
536 | 533 | | |
537 | 534 | | |
538 | 535 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
0 commit comments