Coverity: fix high impact issues
This commit is contained in:
parent
9b013f7254
commit
d98337b5f2
|
@ -138,8 +138,12 @@ int main( int argc, char ** argv )
|
|||
// Destruction phase ===========================================================
|
||||
Console().Log("FreeCAD terminating...\n");
|
||||
|
||||
// close open documents
|
||||
App::GetApplication().closeAllDocuments();
|
||||
try {
|
||||
// close open documents
|
||||
App::GetApplication().closeAllDocuments();
|
||||
}
|
||||
catch(...) {
|
||||
}
|
||||
|
||||
// cleans up
|
||||
Application::destruct();
|
||||
|
|
|
@ -118,6 +118,7 @@ extern "C"
|
|||
Dl_info info;
|
||||
int ret = dladdr((void*)initFreeCAD, &info);
|
||||
if ((ret == 0) || (!info.dli_fname)) {
|
||||
free(argv);
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot get path of the FreeCAD module!");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void)
|
|||
celltext = field.str();
|
||||
}
|
||||
// get colors, style, alignment and span
|
||||
int alignment;
|
||||
int alignment = 0;
|
||||
std::string bcolor = "none";
|
||||
std::string fcolor = "#" + hr.str() + hg.str() + hb.str();
|
||||
std::string textstyle = "";
|
||||
|
|
|
@ -140,8 +140,7 @@ private:
|
|||
FemMeshObject *pcFeature = static_cast<FemMeshObject *>
|
||||
(pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str()));
|
||||
pcFeature->Label.setValue(file.fileNamePure().c_str());
|
||||
pcFeature->FemMesh.setValuePtr(mesh.get());
|
||||
(void)mesh.release();
|
||||
pcFeature->FemMesh.setValuePtr(mesh.release());
|
||||
pcFeature->purgeTouched();
|
||||
|
||||
return Py::None();
|
||||
|
@ -175,8 +174,7 @@ private:
|
|||
FemMeshObject *pcFeature = static_cast<FemMeshObject *>
|
||||
(pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str()));
|
||||
pcFeature->Label.setValue(file.fileNamePure().c_str());
|
||||
pcFeature->FemMesh.setValuePtr(mesh.get());
|
||||
(void)mesh.release();
|
||||
pcFeature->FemMesh.setValuePtr(mesh.release());
|
||||
pcFeature->purgeTouched();
|
||||
}
|
||||
catch(Base::Exception& e) {
|
||||
|
|
|
@ -56,7 +56,7 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderPrimitive,PartDesignGui::ViewProvider
|
|||
|
||||
ViewProviderPrimitive::ViewProviderPrimitive()
|
||||
{
|
||||
|
||||
previewFaceSet = 0;
|
||||
}
|
||||
|
||||
ViewProviderPrimitive::~ViewProviderPrimitive()
|
||||
|
|
|
@ -2698,7 +2698,7 @@ void ViewProviderSketch::drawMergedConstraintIcons(IconQueue iconQueue)
|
|||
|
||||
// Tracks all constraint IDs that are combined into this icon
|
||||
QString idString;
|
||||
int lastVPad;
|
||||
int lastVPad = 0;
|
||||
|
||||
QStringList labels;
|
||||
std::vector<int> ids;
|
||||
|
|
Loading…
Reference in New Issue
Block a user