Part: Fix several coverity issues:

* CID 350581: Structurally dead code
* CID 350620: Structurally dead code
* CID 350563: Big parameter passed by value
* CID 350552: Uncaught exception
* CID 305193: Uncaught exception
* CID 350556: Uninitialized scalar field
* CID 350579: Uninitialized pointer read
This commit is contained in:
wmayer
2022-03-13 16:06:40 +01:00
parent 81ea374800
commit 15ee1fdd4e
6 changed files with 10 additions and 9 deletions

View File

@@ -406,7 +406,7 @@ void ExtrusionHelper::checkInnerWires(std::vector<bool>& isInnerWire, const gp_D
// recursively call the function until all wires are checked
if (numCheckWires > 1)
checkInnerWires(isInnerWire, direction, checklist, !forInner, prisms);
};
}
void ExtrusionHelper::createTaperedPrismOffset(TopoDS_Wire sourceWire,
const gp_Vec& translation,
@@ -452,11 +452,9 @@ void ExtrusionHelper::createTaperedPrismOffset(TopoDS_Wire sourceWire,
}
catch (const Base::Exception& e) {
throw Base::RuntimeError(e.what());
result = TopoDS_Wire();
}
if (!mkOffset.IsDone()) {
Standard_Failure::Raise("Extrusion: Offset could not be created");
result = TopoDS_Wire();
}
if (numEdges == 1) {
// we need to move the offset wire first back to its original position