From: eap Date: Wed, 13 Dec 2017 14:02:49 +0000 (+0300) Subject: Fix valgrind error: Mismatched free() / delete / delete [] X-Git-Tag: V9_0_0~3^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a0c3ea6e8070cf06f4d6af63a47616a1703d1455;p=modules%2Fkernel.git Fix valgrind error: Mismatched free() / delete / delete [] --- diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx index 7b2b1229e..31b608d39 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx @@ -424,7 +424,7 @@ bool SALOMEDSImpl_AttributeParameter::RemoveID(const std::string& theID, const P //======================================================================= SALOMEDSImpl_AttributeParameter* SALOMEDSImpl_AttributeParameter::GetFather() { - SALOMEDSImpl_AttributeParameter* aFather; + SALOMEDSImpl_AttributeParameter* aFather = 0; DF_Label L = Label(); if(L.IsRoot()) return aFather; @@ -643,7 +643,7 @@ std::string SALOMEDSImpl_AttributeParameter::Save() buffer << _bools.size() << " "; for(std::map::const_iterator p = _bools.begin(); p != _bools.end(); p++) { - buffer << convertString(p->first) << " " << p->second << " "; + buffer << convertString(p->first) << " " << p->second << " "; } buffer << _strings.size() << " "; @@ -654,9 +654,9 @@ std::string SALOMEDSImpl_AttributeParameter::Save() buffer << _realarrays.size() << " "; for(std::map< std::string,std::vector >::const_iterator p = _realarrays.begin(); p != _realarrays.end(); p++) { std::vector v(p->second); - sprintf(tmpBuffer, " %s %d ", convertString(p->first).c_str(), v.size()); + sprintf(tmpBuffer, " %s %d ", convertString(p->first).c_str(), (int)v.size()); buffer << tmpBuffer; - for(int i = 0; i >::const_iterator p = _intarrays.begin(); p != _intarrays.end(); p++) { std::vector v(p->second); - sprintf(tmpBuffer, " %s %d ", convertString(p->first).c_str(), v.size()); + sprintf(tmpBuffer, " %s %d ", convertString(p->first).c_str(), (int)v.size()); buffer << tmpBuffer; - for(int i = 0; i >::const_iterator p = _strarrays.begin(); p != _strarrays.end(); p++) { std::vector v(p->second); - sprintf(tmpBuffer, " %s %d ", convertString(p->first).c_str(), v.size()); + sprintf(tmpBuffer, " %s %d ", convertString(p->first).c_str(), (int)v.size()); buffer << tmpBuffer; - for(int i = 0; i