1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

0032341: Coding Rules - eliminate GCC11 compiler warnings -Wmaybe-uninitialized

This commit is contained in:
kgv
2021-04-29 21:01:17 +03:00
parent 36fbf05b15
commit b04cd5d587
13 changed files with 84 additions and 86 deletions

View File

@@ -63,23 +63,23 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
// end of conditions.
{
Standard_Integer I, N = 0, SaveN = 0;
Standard_Real aBornInf[2], aBornSup[2], aUVap[2];
Standard_Integer I = 0, N = 0, SaveN = 0;
Standard_Real aBornInf[2] = {}, aBornSup[2] = {}, aUVap[2] = {};
math_Vector BornInf(aBornInf,1,2), BornSup(aBornSup,1,2), UVap(aUVap,1,2);
Standard_Real PasC, PasCu, PasCv;
Standard_Boolean Arrive; // shows if the line ends
Standard_Boolean Cadre; // shows if one is on border of the domain
Standard_Boolean ArretAjout; //shows if one is on added point
Standard_Real PasC = 0.0, PasCu = 0.0, PasCv = 0.0;
Standard_Boolean Arrive = false; // shows if the line ends
Standard_Boolean Cadre = false; // shows if one is on border of the domain
Standard_Boolean ArretAjout = false; //shows if one is on added point
IntSurf_PntOn2S Psol;
Handle(IntWalk_TheIWLine) CurrentLine; // line under construction
Standard_Boolean Tgtend;
Standard_Boolean Tgtend = false;
IntWalk_StatusDeflection aStatus = IntWalk_OK, StatusPrecedent = IntWalk_OK;
Standard_Integer NbDivision;
Standard_Integer NbDivision = 0;
// number of divisions of step for each section
Standard_Integer StepSign;
Standard_Integer StepSign = 0;
ThePointOfPath PathPnt;

View File

@@ -41,31 +41,31 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
//
// ********************************************************************
{
Standard_Integer I,N = 0,SaveN = 0;
Standard_Real aBornInf[2], aBornSup[2], aUVap[2];
Standard_Integer I = 0, N = 0,SaveN = 0;
Standard_Real aBornInf[2] = {}, aBornSup[2] = {}, aUVap[2] = {};
math_Vector BornInf(aBornInf,1,2), BornSup(aBornSup,1,2);
math_Vector Uvap(aUVap,1,2);// parameters of current approach
Standard_Real PasC; // step of advancement on the tangent
Standard_Real PasCu; // step of advancement current by U
Standard_Real PasCv; // step of advancement current by V
Standard_Real PasSav; // save first step of advancement
Standard_Boolean Arrive;// show if line ends
Standard_Boolean Cadre; // show if on border of the domains
Standard_Boolean ArretAjout; // show if on the added point
Standard_Real PasC = 0.0; // step of advancement on the tangent
Standard_Real PasCu = 0.0; // step of advancement current by U
Standard_Real PasCv = 0.0; // step of advancement current by V
Standard_Real PasSav = 0.0; // save first step of advancement
Standard_Boolean Arrive = false;// show if line ends
Standard_Boolean Cadre = false; // show if on border of the domains
Standard_Boolean ArretAjout = false; // show if on the added point
IntSurf_PntOn2S Psol;
Handle(IntWalk_TheIWLine) CurrentLine; //line under construction
ThePointOfPath PathPnt;
ThePointOfLoop LoopPnt;
Standard_Boolean Tgtbeg,Tgtend;
Standard_Boolean Tgtbeg = false, Tgtend = false;
Standard_Integer StepSign;
Standard_Integer StepSign = 0;
IntWalk_StatusDeflection aStatus = IntWalk_OK, StatusPrecedent;
Standard_Integer NbDivision ; // number of divisions of step
Standard_Integer NbDivision = 0; // number of divisions of step
// during calculation of 1 section
Standard_Integer Ipass ;
Standard_Integer Ipass = 0;
//index in the iterator of points on edge of point of passage

View File

@@ -53,7 +53,7 @@ void IntWalk_IWalking::MakeWalkingPoint
}
else if (Case == 11 || Case == 12)
{
Standard_Real aUV[2], aFF[1], aDD[1][2];
Standard_Real aUV[2] = {}, aFF[1] = {}, aDD[1][2] = {};
math_Vector UV(aUV, 1, 2);
math_Vector FF(aFF, 1, 1);
math_Matrix DD(aDD, 1, 1, 1, 2);