Code inspection: Function is recursive on all execution paths
This inspection reports a function where every reachable return path leads back to the same function recursively. That means the function has no reachable non-recursive exit and is unlikely to complete normally.
Example
int CountDown(int value)
{
if (value > 0)
return CountDown(value - 1);
return CountDown(value + 1);
}
int CountDown(int value)
{
if (value == 0)
return 0;
return CountDown(value - 1);
}
Quick-fix
There is no dedicated quick-fix for this inspection. A typical correction is to add a real base case that returns without making another recursive call.
01 April 2026