Page MenuHomePhorge

Remove trivial cases of unreachable code
ClosedPublic

Authored by aklapper on Aug 24 2024, 08:49.
Tags
None
Referenced Files
F3163322: D25802.1741253033.diff
Wed, Mar 5, 09:23
F2995436: D25802.1740341534.diff
Sat, Feb 22, 20:12
F2995433: D25802.1740341530.diff
Sat, Feb 22, 20:12
F2995406: D25802.1740340462.diff
Sat, Feb 22, 19:54
F2995392: D25802.1740340028.diff
Sat, Feb 22, 19:47
F2935982: D25802.1737892095.diff
Jan 25 2025, 11:48
F2932631: D25802.1737740157.diff
Jan 23 2025, 17:35
F2932630: D25802.1737740156.diff
Jan 23 2025, 17:35

Details

Summary

Static code analysis can detect Unreachable statement - code above always terminates.
The vast majority of occurrences in the Phorge 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
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable