fix Coverity issues

This commit is contained in:
wmayer
2016-08-21 18:46:40 +02:00
parent 82f7944966
commit e8b36592c0
20 changed files with 50 additions and 53 deletions

View File

@@ -733,9 +733,6 @@ GProp_GProps AttachEngine::getInertialPropsOfShape(const std::vector<const TopoD
default:
throw Base::Exception("AttachEngine::getInertialPropsOfShape: unexpected shape type");
}
assert(false);//exec shouldn't ever get here
return GProp_GProps();
}
/*!

View File

@@ -346,7 +346,7 @@ bool Extrusion::isInside(const TopoDS_Wire& wire1, const TopoDS_Wire& wire2) con
// because otherwise we have some intersections which is not allowed
else
return false;
xp.Next();
//xp.Next();
}
return false;

View File

@@ -464,9 +464,6 @@ PyObject* GeometryCurvePy::makeRuledSurface(PyObject *args)
PyErr_SetString(PartExceptionOCCError, e->GetMessageString());
return 0;
}
PyErr_SetString(PartExceptionOCCError, "Geometry is not a curve");
return 0;
}
PyObject* GeometryCurvePy::intersect2d(PyObject *args)

View File

@@ -2313,11 +2313,11 @@ struct MeshVertex
Standard_Integer i;
MeshVertex(Standard_Real X, Standard_Real Y, Standard_Real Z)
: x(X),y(Y),z(Z)
: x(X),y(Y),z(Z),i(0)
{
}
MeshVertex(const gp_Pnt& p)
: x(p.X()),y(p.Y()),z(p.Z())
: x(p.X()),y(p.Y()),z(p.Z()),i(0)
{
}

View File

@@ -624,9 +624,6 @@ PyObject* TopoShapeEdgePy::split(PyObject *args)
PyErr_SetString(PartExceptionOCCError, e->GetMessageString());
return 0;
}
PyErr_SetString(PartExceptionOCCError, "Geometry is not a curve");
return 0;
}
PyObject* TopoShapeEdgePy::isSeam(PyObject *args)

View File

@@ -683,10 +683,9 @@ Py::Object TopoShapeFacePy::getOuterWire(void) const
TopoDS_Wire clWire = ShapeAnalysis::OuterWire(clFace);
return Py::Object(new TopoShapeWirePy(new TopoShape(clWire)),true);
}
else
else {
throw Py::Exception("Internal error, TopoDS_Shape is not a face!");
return Py::Object();
}
}
Py::Object TopoShapeFacePy::getMass(void) const