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-10-04 20:17:05 +01:00 committed by Tim Edwards
parent 1e916ee361
commit bbe447423b
1 changed files with 3 additions and 0 deletions

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;