== Why is this an issue?

Any executed statement whose removal would not affect program output constitutes dead code (also know as redundant code). It is unclear to a reviewer if this is intentional or has occurred due to an error.


=== Noncompliant code example

[source,text]
----
int16_t has_dead_code ( int16_t para ) 
{ 
  int16_t local = 99;
  para = para + local;
  local = para; // Noncompliant, local is never used
  if ( 0 == local )
  {
    local++; // Noncompliant, unreachable
  }
  return para;
}
----


=== Compliant solution

[source,text]
----
int16_t has_dead_code ( int16_t para ) 
{ 
  int16_t local = 99;
  para = para + local;
  return para;
}
----


