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

0024607: Fix some GCC compiler warnings

- enumeration value not handled in switch in Aspect_ColorScale.cxx, TNaming_DeltaOnModification.cxx
- comparison between signed and unsigned integer expressions in NIS_Triangulated.cxx, OSD_MAllocHook.cxx, RWStl.cxx
- static function defined or declared but not used in OpenGl_Workspace_2.cxx, ProjLib_ComputeApprox.cxx
This commit is contained in:
abv
2014-02-08 17:26:06 +04:00
committed by apn
parent feb2743f11
commit 8cb69787f2
7 changed files with 56 additions and 57 deletions

View File

@@ -772,13 +772,12 @@ Standard_Boolean NIS_Triangulated::Intersect
Standard_Boolean aResult (isFullIn);
if ((myType & Type_Triangulation) && myIsDrawPolygons == Standard_False) {
unsigned int iNode = 0;
for (; iNode < myNNodes * myNodeCoord; iNode += myNodeCoord)
unsigned int nbSteps = (unsigned)myNNodes * myNodeCoord;
for (unsigned int iNode = 0; iNode < nbSteps; iNode += myNodeCoord)
{
gp_XYZ aPnt (static_cast<Standard_Real>(mypNodes[iNode+0]),
static_cast<Standard_Real>(mypNodes[iNode+1]), 0.);
gp_XYZ aPnt (mypNodes[iNode+0], mypNodes[iNode+1], 0.);
if (myNodeCoord > 2)
aPnt.SetZ (static_cast<Standard_Real>(mypNodes[iNode+2]));
aPnt.SetZ (mypNodes[iNode+2]);
theTrf.Transforms (aPnt);
if (theBox.IsOut (aPnt)) {
if (isFullIn) {
@@ -1073,13 +1072,12 @@ Standard_Boolean NIS_Triangulated::Intersect
Standard_Boolean aResult (isFullIn);
if ((myType & Type_Triangulation) && myIsDrawPolygons == Standard_False) {
unsigned int iNode = 0;
for (; iNode < myNNodes * myNodeCoord; iNode += myNodeCoord)
unsigned int nbSteps = (unsigned)myNNodes * myNodeCoord;
for (unsigned int iNode = 0; iNode < nbSteps; iNode += myNodeCoord)
{
gp_XYZ aPnt (static_cast<Standard_Real>(mypNodes[iNode+0]),
static_cast<Standard_Real>(mypNodes[iNode+1]), 0.);
gp_XYZ aPnt (mypNodes[iNode+0], mypNodes[iNode+1], 0.);
if (myNodeCoord > 2)
aPnt.SetZ (static_cast<Standard_Real>(mypNodes[iNode+2]));
aPnt.SetZ (mypNodes[iNode+2]);
theTrf.Transforms (aPnt);
gp_XY aP2d(aPnt.X(), aPnt.Y());