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

0024180: Eliminate CLang / GCC compiler warning -Wswitch

Eliminated warnings -Wswitch shown by gcc
Eliminated two new warnings about wrong initialization order
Eliminated warnings about unused functions.
A few more ICC warnings (type conversions) fixed
This commit is contained in:
ski
2013-11-28 11:13:41 +04:00
committed by bugmaster
parent ebeff0a2bc
commit 566f84411f
39 changed files with 299 additions and 120 deletions

View File

@@ -64,6 +64,9 @@ Standard_Integer IntPatch_HInterTool::NbSamplesV (const Handle(Adaptor3d_HSurfac
case GeomAbs_Torus:
case GeomAbs_SurfaceOfRevolution:
case GeomAbs_SurfaceOfExtrusion: return 15;
case GeomAbs_OffsetSurface:
case GeomAbs_OtherSurface: return 10;
}
return 10;
}
@@ -82,13 +85,16 @@ Standard_Integer IntPatch_HInterTool::NbSamplesU (const Handle(Adaptor3d_HSurfac
if (!S->IsURational()) nbs *= 2;
if (nbs < 4) nbs = 4;
return nbs;
}
}
case GeomAbs_Torus: return 20;
//case GeomAbs_Cylinder:
//case GeomAbs_Cone:
//case GeomAbs_Sphere:
//case GeomAbs_SurfaceOfRevolution:
//case GeomAbs_SurfaceOfExtrusion: return 10;
case GeomAbs_Cylinder:
case GeomAbs_Cone:
case GeomAbs_Sphere:
case GeomAbs_SurfaceOfRevolution:
case GeomAbs_SurfaceOfExtrusion:
case GeomAbs_OffsetSurface:
case GeomAbs_OtherSurface: return 10;
}
return 10;
}

View File

@@ -376,6 +376,8 @@ void Recadre(const Standard_Boolean ,
case GeomAbs_Sphere:
while(U1<(U1p-1.5*M_PI)) U1+=M_PI+M_PI;
while(U1>(U1p+1.5*M_PI)) U1-=M_PI+M_PI;
default:
break;
}
switch(typeS2)
{
@@ -387,6 +389,8 @@ void Recadre(const Standard_Boolean ,
case GeomAbs_Sphere:
while(U2<(U2p-1.5*M_PI)) U2+=M_PI+M_PI;
while(U2>(U2p+1.5*M_PI)) U2-=M_PI+M_PI;
default:
break;
}
pt.SetParameters(U1,V1,U2,V2);
}

View File

@@ -628,6 +628,8 @@ static void FUN_NewFirstLast(const GeomAbs_CurveType& ga_ct,
}
break;
}
default:
break;
}
}
//================================================================================
@@ -1477,7 +1479,7 @@ void IntPatch_Intersection::Dump(const Standard_Integer ,
nbR2++;
}
printf("\nDUMP_INT: ----empt:%2d tgte:%2d oppo:%2d ---------------------------------",empt,tgte,empt);
printf("\nDUMP_INT: ----empt:%2ud tgte:%2ud oppo:%2ud ---------------------------------",empt,tgte,empt);
Standard_Integer i,j,nbr1,nbr2,nbgl,nbgc,nbge,nbgp,nbgh,nbl,nbr,nbg,nbw,nba;
nbl=nbr=nbg=nbw=nba=nbgl=nbge=nbr1=nbr2=nbgc=nbgp=nbgh=0;
nbl=NbLines();

View File

@@ -82,16 +82,20 @@ void IntPatch_Point::ReverseTransition()
IntSurf_Transition TLine;
switch (traline1.TransitionType())
{
case IntSurf_In: TLine.SetValue(Standard_False,IntSurf_Out); break;
case IntSurf_Out: TLine.SetValue(Standard_False,IntSurf_In); break;
}
case IntSurf_In: TLine.SetValue(Standard_False,IntSurf_Out); break;
case IntSurf_Out: TLine.SetValue(Standard_False,IntSurf_In); break;
default:
break;
}
traline1=TLine;
IntSurf_Transition TArc;
switch (tra1.TransitionType())
{
case IntSurf_In: TArc.SetValue(Standard_False,IntSurf_Out); break;
case IntSurf_Out: TArc.SetValue(Standard_False,IntSurf_In); break;
}
case IntSurf_In: TArc.SetValue(Standard_False,IntSurf_Out); break;
case IntSurf_Out: TArc.SetValue(Standard_False,IntSurf_In); break;
default:
break;
}
tra1=TArc;
}
if(onS2)
@@ -99,16 +103,20 @@ void IntPatch_Point::ReverseTransition()
IntSurf_Transition TLine;
switch (traline2.TransitionType())
{
case IntSurf_In: TLine.SetValue(Standard_False,IntSurf_Out); break;
case IntSurf_Out: TLine.SetValue(Standard_False,IntSurf_In); break;
}
case IntSurf_In: TLine.SetValue(Standard_False,IntSurf_Out); break;
case IntSurf_Out: TLine.SetValue(Standard_False,IntSurf_In); break;
default:
break;
}
traline2=TLine;
IntSurf_Transition TArc;
switch (tra2.TransitionType())
{
case IntSurf_In: TArc.SetValue(Standard_False,IntSurf_Out); break;
case IntSurf_Out: TArc.SetValue(Standard_False,IntSurf_In); break;
}
case IntSurf_In: TArc.SetValue(Standard_False,IntSurf_Out); break;
case IntSurf_Out: TArc.SetValue(Standard_False,IntSurf_In); break;
default:
break;
}
tra2=TArc;
}
}