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

0024510: Remove unused local variables

When warnings are enabled, compilers report lots of occurrences
of unused local variables, which makes it harder to find other
meaningful warnings.
This commit does not fix all unused local variables.

Fix new type conversion warning

Code cleaned to avoid MSVC compiler warnings on unused function arguments.
Several useless pieces of code are removed.
Changes in IntTools_EdgeFace.cxx, Blend_Walking_1.gxx, Bnd_BoundSortBox.cxx, ProjLib_ProjectedCurve.cxx are reverted (separated to specific issue for more in-depth analysis).
This commit is contained in:
Denis Barbier
2014-01-09 12:20:06 +04:00
committed by bugmaster
parent b467a87036
commit 96a95605cd
230 changed files with 455 additions and 1286 deletions

View File

@@ -562,14 +562,9 @@ void GeometryTest::APICommands(Draw_Interpretor& theCommands)
if (done) return;
done = Standard_True;
const char* g;
g = "GEOMETRY curves and surfaces analysis";
theCommands.Add("proj", "proj curve/surf x y z [extrema algo: g(grad)/t(tree)]",__FILE__, proj);
g = "GEOMETRY approximations";
theCommands.Add("appro", "appro result nbpoint [curve]",__FILE__, appro);
theCommands.Add("surfapp","surfapp result nbupoint nbvpoint x y z ....",
__FILE__,
@@ -578,8 +573,6 @@ void GeometryTest::APICommands(Draw_Interpretor& theCommands)
"grilapp result nbupoint nbvpoint X0 dX Y0 dY z11 z12 .. z1nu .... ",
__FILE__,grilapp);
g = "GEOMETRY curves and surfaces analysis";
theCommands.Add("extrema", "extrema curve/surface curve/surface",__FILE__,extrema);
theCommands.Add("totalextcc", "totalextcc curve curve",__FILE__,totalextcc);
}

View File

@@ -418,7 +418,7 @@ static Standard_Integer project (Draw_Interpretor& di,
Standard_Real U1,U2,V1,V2;
GS->Bounds(U1,U2,V1,V2);
Standard_Boolean Verif = Standard_False, Extent = Standard_False;
Standard_Boolean Verif = Standard_False;
Standard_Integer NbPoints=0;
Standard_Integer index = 4;
@@ -430,7 +430,6 @@ static Standard_Integer project (Draw_Interpretor& di,
Standard_Real dU = p * (U2 - U1) / 100.;
Standard_Real dV = p * (V2 - V1) / 100.;
U1 -= dU; U2 += dU; V1 -= dV; V2 += dV;
Extent = Standard_True;
}
else if ( a[index][1] == 'v') {
Verif = Standard_True;
@@ -762,7 +761,7 @@ static Standard_Integer bisec (Draw_Interpretor& di,
static Standard_Integer movelaw (Draw_Interpretor& di, Standard_Integer n, const char** a)
{
Standard_Integer dimension,
Standard_Integer
ii,
condition=0,
error_status ;
@@ -774,7 +773,6 @@ static Standard_Integer movelaw (Draw_Interpretor& di, Standard_Integer n, const
u = Draw::Atof(a[2]);
x = Draw::Atof(a[3]);
tolerance = 1.0e-5 ;
dimension = 2 ;
if (n < 5) {
return 1 ;
}

View File

@@ -56,7 +56,6 @@ BattenCurve(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
const char *cheigth = argv[5];
const char *BattenName = argv[6];
Standard_Boolean Ok;
FairCurve_AnalysisCode Iana;
Standard_Real a1 = Draw::Atof(cangle1),
a2 = Draw::Atof(cangle2),
@@ -71,7 +70,7 @@ BattenCurve(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
Bat->SetAngle1(a1*M_PI/180);
Bat->SetAngle2(a2*M_PI/180);
Ok = Bat->Compute(Iana);
Bat->Compute(Iana);
Handle(DrawFairCurve_Batten) aBatten = new DrawFairCurve_Batten(Bat);
@@ -100,7 +99,6 @@ MVCurve(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
const char *cheigth = argv[5];
const char *MVCName = argv[6];
Standard_Boolean Ok;
FairCurve_AnalysisCode Iana;
Standard_Real a1 = Draw::Atof(cangle1),
a2 = Draw::Atof(cangle2),
@@ -115,7 +113,7 @@ MVCurve(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
MVC->SetAngle1(a1*M_PI/180);
MVC->SetAngle2(a2*M_PI/180);
Ok = MVC->Compute(Iana);
MVC->Compute(Iana);
Handle(DrawFairCurve_MinimalVariation) aMVC = new DrawFairCurve_MinimalVariation(MVC);

View File

@@ -81,9 +81,6 @@ static Standard_Integer sweep (Draw_Interpretor&,
GeomFill_Trihedron Option = GeomFill_IsCorrectedFrenet;
Standard_Integer ipath =2, isection =4 , NbSeg=30, MaxDegree = 10;
Standard_Real Tol = 1.e-4;
#if DEB
static Standard_Boolean AdvApprox_Debug = 1;
#endif
if (n < 4 ) return 1;
@@ -161,9 +158,6 @@ static Standard_Integer tuyau (Draw_Interpretor&,
Standard_Integer n, const char** a)
{
if ( n < 4) return 1;
#if DEB
static Standard_Boolean AdvApprox_Debug = 1;
#endif
GeomAbs_Shape Cont = GeomAbs_C2;
GeomFill_Pipe Pipe;