Rule Definition
The default case is executed when none of the conditions being tested for in the switch statement are met or executed. Having no default, means that there is no backup.
The cases that are "impossible" today are the ones most likely to be the causes of untraceable bugs in the future, when the impossible changes to the standard.
Remediation
Add the OTHERWISE clause for the SELECT statement not having one.
Violation Code Sample
SELECT(COND);
WHEN(A)
DO;
...
END;
WHEN(B)
DO;
...
END;
WHEN(C)
DO;
...
END;
Fixed Code Sample
SELECT(COND);
WHEN(A)
DO;
...
END;
WHEN(B)
DO;
...
END;
WHEN(C)
DO;
...
END;
OTHERWISE
DO;
...
END;
Related Technologies
Technical Criterion
CWE-478 - Missing Default Case in Switch Statement
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.