Skip to content

Commit

Permalink
gcc warning fix: uninitialized variable
Browse files Browse the repository at this point in the history
  • Loading branch information
tpaviot committed Feb 28, 2017
1 parent 0a2197e commit 77737d8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/BRepOffset/BRepOffset_MakeOffset.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ static void TrimEdge (TopoDS_Edge& NE,
Standard_Real aSameParTol = Precision::Confusion();

TopoDS_Vertex V1,V2;
Standard_Real U;
Standard_Real U=0.;
Standard_Real UMin = Precision::Infinite();
Standard_Real UMax = -UMin;

Expand Down
26 changes: 13 additions & 13 deletions src/Dico/Dico_Dictionary.gxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Dico_Dictionary::Dico_Dictionary ()
(const Standard_CString name, const Standard_Boolean exact) const
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
if (stat != 0 || reslev != 0) return Standard_False;
Expand All @@ -62,7 +62,7 @@ Dico_Dictionary::Dico_Dictionary ()
(const TCollection_AsciiString& name, const Standard_Boolean exact) const
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
if (stat != 0 || reslev != 0) return Standard_False;
Expand All @@ -77,7 +77,7 @@ Dico_Dictionary::Dico_Dictionary ()
(const Standard_CString name, const Standard_Boolean exact) const
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
if (stat != 0 || reslev != 0)
Expand All @@ -92,7 +92,7 @@ Dico_Dictionary::Dico_Dictionary ()
(const TCollection_AsciiString& name, const Standard_Boolean exact) const
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
if (stat != 0 || reslev != 0)
Expand All @@ -110,7 +110,7 @@ Dico_Dictionary::Dico_Dictionary ()
TheItem& anitem, const Standard_Boolean exact) const
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
if (stat != 0 || reslev != 0) return Standard_False;
Expand All @@ -125,7 +125,7 @@ Dico_Dictionary::Dico_Dictionary ()
TheItem& anitem, const Standard_Boolean exact) const
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
if (stat != 0 || reslev != 0) return Standard_False;
Expand All @@ -142,7 +142,7 @@ Dico_Dictionary::Dico_Dictionary ()
const TheItem& anitem, const Standard_Boolean exact)
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
Standard_Size namlen = strlen(name);
SearchCell (name,namlen,name[0],1, acell,reslev,stat);
Expand All @@ -159,7 +159,7 @@ Dico_Dictionary::Dico_Dictionary ()
const TheItem& anitem, const Standard_Boolean exact)
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
Standard_CString namval = name.ToCString();
Standard_Integer namlen = name.Length();
Expand All @@ -179,7 +179,7 @@ Dico_Dictionary::Dico_Dictionary ()
Standard_Boolean& isvalued, const Standard_Boolean exact)
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
Standard_Size namlen = strlen(name);
SearchCell (name,namlen,name[0],1, acell,reslev,stat);
Expand All @@ -205,7 +205,7 @@ Dico_Dictionary::Dico_Dictionary ()
Standard_Boolean& isvalued, const Standard_Boolean exact)
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
Standard_Integer namlen = name.Length();
Standard_CString namval = name.ToCString();
Expand Down Expand Up @@ -233,7 +233,7 @@ Dico_Dictionary::Dico_Dictionary ()
const Standard_Boolean cln, const Standard_Boolean exact)
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
SearchCell (name,strlen(name),name[0],1, acell,reslev,stat);
// if (stat != 0) { cout<<"Dictionary : RemoveItem not found"<<endl; return; }
Expand All @@ -250,7 +250,7 @@ Dico_Dictionary::Dico_Dictionary ()
const Standard_Boolean cln, const Standard_Boolean exact)
{
Handle(Dico_Dictionary) acell;
Standard_Integer stat;
Standard_Integer stat=0;
Standard_Size reslev;
SearchCell (name.ToCString(),name.Length(),name.Value(1),1, acell,reslev,stat);
// if (stat != 0) { cout<<"Dictionary : RemoveItem not found"<<endl; return; }
Expand Down Expand Up @@ -356,7 +356,7 @@ Dico_Dictionary::Dico_Dictionary ()
if (thecars[3] == '\0') { acell = this; stat = 1; return; }
else { // ici, HasNext
if (thecars[3] > car) { acell = this; stat = 1; return; }
Standard_Integer stat2;
Standard_Integer stat2=0;
Standard_Size lev2;
thenext->SearchCell (name,lmax,car,level,acell,lev2,stat2);
if (stat2 < 0) { acell = this; stat = 1; return; }
Expand Down
2 changes: 1 addition & 1 deletion src/IntCurve/IntCurve_IntConicConic_1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L1
//--
Standard_Integer ResHasFirstPoint=0;
Standard_Integer ResHasLastPoint=0;
Standard_Real ParamStart = 0.,ParamStart2,ParamEnd = 0.,ParamEnd2;
Standard_Real ParamStart = 0.,ParamStart2 = 0.,ParamEnd = 0.,ParamEnd2 = 0.;
Standard_Real Org2SurL1=ElCLib::Parameter(L1,L2.Location());
//== 3 : L1 et L2 bornent
//== 2 : L2 borne
Expand Down
2 changes: 1 addition & 1 deletion src/IntPatch/IntPatch_ImpImpIntersection_0.gxx
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void PutPointsOnLine(const Handle(Adaptor3d_HSurface)& S1,
//
Standard_Integer i,k;
Standard_Integer linenumber;
Standard_Real paraint,currentparameter,tolerance;
Standard_Real paraint=0.,currentparameter,tolerance;
Standard_Real U1,V1,U2,V2;
Standard_Boolean goon;

Expand Down
2 changes: 1 addition & 1 deletion src/IntTools/IntTools_EdgeEdge.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ void IntTools_EdgeEdge::FindBestSolution(const Standard_Real aT11,
{
Standard_Integer i, aNbS, iErr;
Standard_Real aDMin, aD, aCrit, aRes1;
Standard_Real aT1x, aT2x, aT1p, aT2p;
Standard_Real aT1x, aT2x, aT1p=0., aT2p=0.;
GeomAPI_ProjectPointOnCurve aProj;
IntTools_SequenceOfRanges aSeg1;
//
Expand Down
2 changes: 1 addition & 1 deletion src/TopOpeBRep/TopOpeBRep_vprdeg.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ Standard_Boolean TopOpeBRep_FacesFiller::ProcessVPondgE
Standard_Boolean hasOOEi=Standard_False; TopoDS_Edge OOEi; Standard_Real parOOEi;
TopOpeBRepDS_Transition T1ondg, T2ondg;
Standard_Integer rankdg=0, Iiondg=0;
Standard_Real par1ondg, par2ondg;
Standard_Real par1ondg=0., par2ondg=0.;
Standard_Boolean hasdgdata = !myDataforDegenEd.IsEmpty();
if (!hasdgdata) {
return Standard_False;
Expand Down
4 changes: 2 additions & 2 deletions src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static Standard_Boolean FUN_tg(const TopoDS_Edge& e,const Standard_Real par,cons
st = BEFORE;
for (Standard_Integer nite = 1; nite <= 2; nite++) {
if (nite == 2) st = AFTER;
Standard_Real pn; Standard_Boolean mkp = FUN_getnearpar(e,par,f,l,factor,st,pn);
Standard_Real pn=0.; Standard_Boolean mkp = FUN_getnearpar(e,par,f,l,factor,st,pn);
if (!mkp) continue;
gp_Vec tmp; Standard_Boolean ok = TopOpeBRepTool_TOOL::TggeomE(pn,e,tmp);
if (!ok) continue;
Expand Down Expand Up @@ -473,7 +473,7 @@ static Standard_Boolean FUN_staproj(const TopoDS_Edge& e,const Standard_Real pf,
const Standard_Real factor, const Standard_Integer st, const TopoDS_Face& f,
TopAbs_State& sta)
{
Standard_Real par;Standard_Boolean ok = FUN_getnearpar(e,pe,pf,pl,factor,st, par);
Standard_Real par=0.;Standard_Boolean ok = FUN_getnearpar(e,pe,pf,pl,factor,st, par);
if (!ok) return Standard_False;
gp_Pnt pt; ok = FUN_tool_value(par,e, pt);
if (!ok) return Standard_False;
Expand Down

0 comments on commit 77737d8

Please sign in to comment.