Page MenuHomePhorge

Remove trivial cases of unreachable code
ClosedPublic

Authored by aklapper on Aug 24 2024, 08:53.
Tags
None
Referenced Files
F2934869: D25803.1737805581.diff
Fri, Jan 24, 11:46
F2932632: D25803.1737740158.diff
Thu, Jan 23, 17:35
F2932628: D25803.1737740156.diff
Thu, Jan 23, 17:35
F2932484: D25803.1737736928.diff
Thu, Jan 23, 16:42
F2932480: D25803.1737736801.diff
Thu, Jan 23, 16:40
F2896832: D25803.1737243495.diff
Fri, Jan 17, 23:38
F2892831: D25803.1737221154.diff
Fri, Jan 17, 17:25
F2889050: D25803.1737198620.diff
Fri, Jan 17, 11:10

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