Coverity: fix high impact issues

This commit is contained in:
wmayer
2016-08-17 15:33:04 +02:00
parent 9b013f7254
commit d98337b5f2
6 changed files with 12 additions and 9 deletions

View File

@@ -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 = "";

View File

@@ -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) {

View File

@@ -56,7 +56,7 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderPrimitive,PartDesignGui::ViewProvider
ViewProviderPrimitive::ViewProviderPrimitive()
{
previewFaceSet = 0;
}
ViewProviderPrimitive::~ViewProviderPrimitive()

View File

@@ -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;