Skip to content

Commit

Permalink
patchkernel: silence Coverity error
Browse files Browse the repository at this point in the history
Coverity doesn't know that the interface neighbour is always among
the interface adjacencies. Add an assertion to silence the error.
  • Loading branch information
andrea-iob committed Dec 13, 2019
1 parent c2cdcc1 commit 2dddf18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/patchkernel/patch_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4741,6 +4741,7 @@ PatchKernel::InterfaceIterator PatchKernel::buildCellInterface(Cell *cell_1, int
long ownerPairedAdjacency = intrOwner->getAdjacency(intrOwnerFace, ownerInterfaceIndex);
if (ownerPairedAdjacency != intrNeighId) {
int ownerPairedAdjacencyIndex = intrOwner->findAdjacency(intrOwnerFace, intrNeighId);
assert(ownerPairedAdjacencyIndex >= 0);
intrOwner->setAdjacency(intrOwnerFace, ownerInterfaceIndex, intrNeighId);
intrOwner->setAdjacency(intrOwnerFace, ownerPairedAdjacencyIndex, ownerPairedAdjacency);
}
Expand Down

0 comments on commit 2dddf18

Please sign in to comment.