gaStem.c: type, The left operand of '==' is a garbage value

Theoretical use of unintialized data.

Added 'default' case into switch to throw ASSERT(), otherwise
when assertions disabled treat consistently as GEO_NORTH.

SonarCloud
The left operand of '==' is a garbage value
https://sonarcloud.io/project/issues?open=AZJB17fSNGfDNup0Rkoh&id=dlmiles_magic
This commit is contained in:
Darryl L. Miles
2024-12-26 13:01:24 -05:00
committed by Tim Edwards
parent 1e916ee361
commit bbe447423b
+3
View File
@@ -802,6 +802,9 @@ gaStemNetClear(termArea, point, side, netList)
*/
switch (side)
{
default:
ASSERT(FALSE, "side");
/* fall-thru */
case GEO_NORTH:
r.r_xbot = point->p_x - RtrSubcellSepUp;
r.r_xtop = point->p_x + RtrSubcellSepDown;