Skip to content
Snippets Groups Projects
Commit dbd8af41 authored by Lorenzo Moneta's avatar Lorenzo Moneta
Browse files

fixes from coverity

(un-initialized variables in constructors)


git-svn-id: http://root.cern.ch/svn/root/trunk@35018 27541ba8-7e3a-0410-8455-c3a389f83636
parent ee9951c6
Branches
Tags
No related merge requests found
...@@ -65,7 +65,7 @@ public: ...@@ -65,7 +65,7 @@ public:
/** /**
Default Constructor of a GSLDerivator class based on GSL numerical differentiation algorithms Default Constructor of a GSLDerivator class based on GSL numerical differentiation algorithms
*/ */
GSLDerivator() {} GSLDerivator() : fStatus(0), fResult(0), fError(0) {}
/// destructor (no operations) /// destructor (no operations)
virtual ~GSLDerivator() {} virtual ~GSLDerivator() {}
......
...@@ -118,7 +118,10 @@ private: ...@@ -118,7 +118,10 @@ private:
GSLNLSMinimizer::GSLNLSMinimizer( int /* ROOT::Math::EGSLNLSMinimizerType type */ ) : GSLNLSMinimizer::GSLNLSMinimizer( int /* ROOT::Math::EGSLNLSMinimizerType type */ ) :
fDim(0), fDim(0),
fObjFunc(0) fNFree(0),
fSize(0),
fObjFunc(0),
fMinVal(0)
{ {
// Constructor implementation : create GSLMultiFit wrapper object // Constructor implementation : create GSLMultiFit wrapper object
fGSLMultiFit = new GSLMultiFit( /*type */ ); fGSLMultiFit = new GSLMultiFit( /*type */ );
......
...@@ -66,6 +66,7 @@ TQpLinSolverBase::TQpLinSolverBase() ...@@ -66,6 +66,7 @@ TQpLinSolverBase::TQpLinSolverBase()
fNxlo = 0; fNxlo = 0;
fMcup = 0; fMcup = 0;
fMclo = 0; fMclo = 0;
fFactory = 0;
} }
...@@ -332,6 +333,9 @@ TQpLinSolverBase &TQpLinSolverBase::operator=(const TQpLinSolverBase &source) ...@@ -332,6 +333,9 @@ TQpLinSolverBase &TQpLinSolverBase::operator=(const TQpLinSolverBase &source)
fCupIndex .ResizeTo(source.fCupIndex); fCupIndex = source.fCupIndex; fCupIndex .ResizeTo(source.fCupIndex); fCupIndex = source.fCupIndex;
fXloIndex .ResizeTo(source.fXloIndex); fXloIndex = source.fXloIndex; fXloIndex .ResizeTo(source.fXloIndex); fXloIndex = source.fXloIndex;
fCloIndex .ResizeTo(source.fCloIndex); fCloIndex = source.fCloIndex; fCloIndex .ResizeTo(source.fCloIndex); fCloIndex = source.fCloIndex;
// LM : copy also pointer data member
fFactory = source.fFactory;
} }
return *this; return *this;
} }
...@@ -72,6 +72,8 @@ TQpResidual::TQpResidual() ...@@ -72,6 +72,8 @@ TQpResidual::TQpResidual()
fNxlo = 0.0; fNxlo = 0.0;
fMcup = 0.0; fMcup = 0.0;
fMclo = 0.0; fMclo = 0.0;
fResidualNorm = 0.0;
fDualityGap = 0.0;
} }
...@@ -115,6 +117,9 @@ TQpResidual::TQpResidual(Int_t nx,Int_t my,Int_t mz,TVectorD &ixlo,TVectorD &ixu ...@@ -115,6 +117,9 @@ TQpResidual::TQpResidual(Int_t nx,Int_t my,Int_t mz,TVectorD &ixlo,TVectorD &ixu
fRw.ResizeTo(fNx); fRw.ResizeTo(fNx);
fRphi.ResizeTo(fNx); fRphi.ResizeTo(fNx);
} }
fResidualNorm = 0.0;
fDualityGap = 0.0;
} }
...@@ -403,6 +408,10 @@ TQpResidual &TQpResidual::operator=(const TQpResidual &source) ...@@ -403,6 +408,10 @@ TQpResidual &TQpResidual::operator=(const TQpResidual &source)
fRphi .ResizeTo(source.fRphi); fRphi = source.fRphi; fRphi .ResizeTo(source.fRphi); fRphi = source.fRphi;
fRlambda.ResizeTo(source.fRlambda); fRlambda = source.fRlambda; fRlambda.ResizeTo(source.fRlambda); fRlambda = source.fRlambda;
fRpi .ResizeTo(source.fRpi); fRpi = source.fRpi; fRpi .ResizeTo(source.fRpi); fRpi = source.fRpi;
// LM: copy also these data members
fResidualNorm = source.fResidualNorm;
fDualityGap = source.fDualityGap;
} }
return *this; return *this;
} }
...@@ -81,6 +81,8 @@ TQpSolverBase::TQpSolverBase() ...@@ -81,6 +81,8 @@ TQpSolverBase::TQpSolverBase()
fRnorm_history = new Double_t[fMaxit]; fRnorm_history = new Double_t[fMaxit];
fPhi_history = new Double_t[fMaxit]; fPhi_history = new Double_t[fMaxit];
fPhi_min_history = new Double_t[fMaxit]; fPhi_min_history = new Double_t[fMaxit];
fIter = 0;
} }
......
...@@ -64,6 +64,7 @@ TQpVar::TQpVar() ...@@ -64,6 +64,7 @@ TQpVar::TQpVar()
fNxlo = 0; fNxlo = 0;
fMcup = 0; fMcup = 0;
fMclo = 0; fMclo = 0;
fNComplementaryVariables = 0;
} }
...@@ -800,6 +801,9 @@ TQpVar &TQpVar::operator=(const TQpVar &source) ...@@ -800,6 +801,9 @@ TQpVar &TQpVar::operator=(const TQpVar &source)
fU .ResizeTo(source.fU); fU = source.fU; fU .ResizeTo(source.fU); fU = source.fU;
fPi .ResizeTo(source.fPi); fPi = source.fPi; fPi .ResizeTo(source.fPi); fPi = source.fPi;
// LM: copy also this data member
fNComplementaryVariables = source.fNComplementaryVariables;
} }
return *this; return *this;
} }
...@@ -428,15 +428,22 @@ The results above can be obtained by running the tutorial TestSPlot.C ...@@ -428,15 +428,22 @@ The results above can be obtained by running the tutorial TestSPlot.C
//____________________________________________________________________ //____________________________________________________________________
TSPlot::TSPlot() TSPlot::TSPlot() :
fTree(0),
fTreename(0),
fVarexp(0),
fSelection(0)
{ {
// default constructor (used by I/O only) // default constructor (used by I/O only)
fNumbersOfEvents=0; fNumbersOfEvents=0;
fTree = 0;
} }
//____________________________________________________________________ //____________________________________________________________________
TSPlot::TSPlot(Int_t nx, Int_t ny, Int_t ne, Int_t ns, TTree *tree) TSPlot::TSPlot(Int_t nx, Int_t ny, Int_t ne, Int_t ns, TTree *tree) :
fTreename(0),
fVarexp(0),
fSelection(0)
{ {
//normal TSPlot constructor //normal TSPlot constructor
// nx : number of control variables // nx : number of control variables
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment