ExtBasic.c: oppdir, The right operand of '==' is a garbage value

BD_xxxxx are a bitmask.  So it makes sense due to equality check to
set to zero so it becomes a no-op situation.

I assume lb->dir not matching one of the 4 BD_xxxxx labels would be
a data error anyway and should never occur.

SonarCloud
The right operand of '==' is a garbage value
https://sonarcloud.io/project/issues?open=AZJB16p0NGfDNup0RiW9&id=dlmiles_magic
This commit is contained in:
Darryl L. Miles 2024-10-04 20:15:29 +01:00 committed by Tim Edwards
parent 6eff1c2132
commit 1e916ee361
1 changed files with 2 additions and 0 deletions

View File

@ -1267,6 +1267,8 @@ extComputeEffectiveLW(rlengthptr, rwidthptr, numregions, chop)
case BD_RIGHT: oppdir = BD_LEFT; break; case BD_RIGHT: oppdir = BD_LEFT; break;
case BD_TOP: oppdir = BD_BOTTOM; break; case BD_TOP: oppdir = BD_BOTTOM; break;
case BD_BOTTOM: oppdir = BD_TOP; break; case BD_BOTTOM: oppdir = BD_TOP; break;
default: ASSERT(FALSE, "oppdir"); /* should never happen */
oppdir = 0; break;
} }
/* First pass: Find the distance of the closest segment within */ /* First pass: Find the distance of the closest segment within */