From 1e916ee3612d00ff0bce9da7574e4e33abd8aaa2 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Fri, 4 Oct 2024 20:15:29 +0100 Subject: [PATCH] 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 --- extract/ExtBasic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index 17808f91..97ecffd7 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -1267,6 +1267,8 @@ extComputeEffectiveLW(rlengthptr, rwidthptr, numregions, chop) case BD_RIGHT: oppdir = BD_LEFT; break; case BD_TOP: oppdir = BD_BOTTOM; 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 */