Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Code that is never executed is known as dead code. Typically, the presence of dead code indicates that a logic error has occurred as a result of changes to a program or the program's environment. To improve readability and ensure that logic errors are resolved, dead code should be identified, understood, and eliminated.

...

The presence dead code may indicate logic errors that can lead to unintended program behavior. As a result, resolving dead code can be an in-depth process requiring significant analysis.

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

MSC00-PL

low

unlikely

high

P1

L3

Automated Detection

Tool

Diagnostic

Perl::Critic

Subroutines::ProhibitUnusedPrivateSubroutines

Perl::Critic

ControlStructures::ProhibitUnreachableCode

Security Reviewer - Static Reviewer

CWE561P1
PERL_D81
CWE561P15
CWE561P19
CWE561P2
CWE570P1

Related Guidelines

...

...

...

...

...

Automated Detection

Tool

Diagnostic

Perl::Critic

Subroutines::ProhibitUnusedPrivateSubroutines

Perl::Critic

Variables::ProhibitUnreachableCode

Bibliography


...

Image Modified Image Modified Image Modified