Page MenuHomePhorge

Remove trivial cases of unreachable code
ClosedPublic

Authored by aklapper on Aug 24 2024, 08:53.
Tags
None
Referenced Files
F3841836: D25803.1746098656.diff
Wed, Apr 30, 11:24
F3800976: D25803.1745938341.diff
Mon, Apr 28, 14:52
F3792892: D25803.1745926899.diff
Mon, Apr 28, 11:41
F3777094: D25803.1745873246.diff
Sun, Apr 27, 20:47
F3387802: D25803.1744441027.diff
Fri, Apr 11, 06:57
F3383576: D25803.1744390579.diff
Thu, Apr 10, 16:56
F3377779: D25803.1744345239.diff
Thu, Apr 10, 04:20
F3372174: D25803.1744248821.diff
Wed, Apr 9, 01:33

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