Page MenuHomePhorge

Remove trivial cases of unreachable code
ClosedPublic

Authored by aklapper on Aug 24 2024, 08:53.
Tags
None
Referenced Files
F3333671: D25803.1743538525.diff
Mon, Mar 31, 20:15
F3328886: D25803.1743464186.diff
Sun, Mar 30, 23:36
F3328452: D25803.1743457274.diff
Sun, Mar 30, 21:41
F3319722: D25803.1743313461.diff
Sat, Mar 29, 05:44
F3319390: D25803.1743306173.diff
Sat, Mar 29, 03:42
F3317827: D25803.1743269171.diff
Fri, Mar 28, 17:26
F3317817: D25803.1743268816.diff
Fri, Mar 28, 17:20
F3317804: D25803.1743268744.diff
Fri, Mar 28, 17:19

Details

Summary

Static code analysis can detect Unreachable statement - code above always terminates.
The vast majority of occurrences in the Arcanist codebase are due to an unreachable break within a case after a return or after an all-covering if/else.
All this noise makes it harder to spot real logic issues (there are some!), thus fix these trivial cases.

Test Plan

Examine the code; run static code analysis.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable