1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0024059: Eliminate compiler warning C4701 in MSVC++ with warning level 4

Removing pPotentially uninitialized local variable
Got rid of most of warnings C4701: Potentially uninitialized local variable
Removed redundant variable definitions.
Refactored a part of AppParCurves_ResolConstraint CTOR.
Replaced 0. to Precision::Confusion for tolerance vars;
Changed values for min and max parameter vars;
Got rid of redundant variables' initialization.
This commit is contained in:
omy
2013-08-22 12:07:14 +04:00
committed by bugmaster
parent 99d99a6db2
commit 1d47d8d066
196 changed files with 671 additions and 817 deletions

View File

@@ -612,7 +612,7 @@ static Standard_Boolean InitialPoint(const gp_Pnt& Point,
prevDeb=t;
if (t == LastU) FromLastU=Standard_True;
Standard_Boolean initpoint=Standard_False;
Standard_Real U, V;
Standard_Real U = 0., V = 0.;
gp_Pnt CPoint;
Standard_Real ParT,ParU,ParV;

View File

@@ -91,7 +91,7 @@ static gp_Pnt2d Function_Value(const Standard_Real U,
const Standard_Boolean UCouture,
const Standard_Boolean VCouture )
{
Standard_Real S, T;
Standard_Real S = 0., T = 0.;
gp_Pnt P3d = myCurve->Value(U);
GeomAbs_SurfaceType SType = mySurface->GetType();
@@ -1072,7 +1072,7 @@ ProjLib_ComputeApprox::ProjLib_ComputeApprox
//Return curve home
Standard_Real UFirst = F.FirstParameter();
gp_Pnt P3d = C->Value( UFirst );
Standard_Real u, v;
Standard_Real u = 0., v = 0.;
switch (SType)
{
case GeomAbs_Plane:

View File

@@ -119,7 +119,7 @@ static gp_Pnt2d Function_Value(const Standard_Real U,
if((Type != GeomAbs_BSplineSurface) &&
(Type != GeomAbs_BezierSurface) &&
(Type != GeomAbs_OffsetSurface) ) {
Standard_Real S, T;
Standard_Real S = 0., T = 0.;
switch (Type) {
// case GeomAbs_Plane:
// {

View File

@@ -468,7 +468,7 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
{
Standard_Boolean IsTrimmed[2] = {Standard_False, Standard_False};
Standard_Real Vsingular[2]; //for surfaces of revolution
Standard_Real f, l, dt;
Standard_Real f = 0., l = 0., dt = 0.;
const Standard_Real eps = 0.01;
if(mySurface->GetType() == GeomAbs_SurfaceOfRevolution) {
@@ -512,7 +512,7 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
// doit etre une et une seule courbe !!!
// De plus, cette courbe ne doit pas etre Single point
Standard_Integer NbCurves = Projector.NbCurves();
Standard_Real Udeb,Ufin;
Standard_Real Udeb = 0.,Ufin = 0.;
if (NbCurves > 0) {
Projector.Bounds(1,Udeb,Ufin);
}