Archived issue #0024877

GCC 4.4.5 compiler warnings on Debian when OCCT is bult using CMake

Open CASCADEOCCT:Codingclosed3 public notes

Search issues

Description

When building with makefiles generated by CMake on Debian 6.0 64-bit with GCC 4.4.5, the following additional compiler warnings are reported:

[user path removed]/occt671/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx: In function void FindBounds(const TColStd_Array1OfReal&, Standard_Real, Standard_Real, Standard_Integer&, Standard_Integer&, Standard_Boolean&):
[user path removed]/occt671/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx:197: warning: N may be used uninitialized in this function
[user path removed]/occt671/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx: In function void Locate2Coord(Standard_Integer, const gp_Pnt2d&, const gp_Vec2d&, const Handle_Geom_BSplineSurface&, const TColStd_Array1OfReal&, gp_Pnt2d&, gp_Pnt2d&):
[user path removed]/occt671/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx:615: warning: N may be used uninitialized in this function
[user path removed]/occt671/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx: In member function Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::IsAnIsoparametric(Standard_Integer, const TColgp_Array1OfPnt&, const TColStd_Array1OfReal&, Standard_Boolean&, Standard_Boolean&, gp_Pnt2d&, Standard_Boolean&, gp_Pnt2d&, Standard_Boolean&, Handle_Geom_Curve&, Standard_Real&, Standard_Real&, TColStd_Array1OfReal&) const:
[user path removed]/occt671/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx:1382: warning: tp[1] may be used uninitialized in this function
[user path removed]/occt671/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx:1382: warning: tp[0] may be used uninitialized in this function
[user path removed]/occt671/adm/cmake/TKOpenGl/../../../inc/OpenGl_Workspace.hxx: In constructor OpenGl_Workspace::OpenGl_Workspace(const Handle_OpenGl_Display&, const CALL_DEF_WINDOW&, void*, const Handle_OpenGl_Caps&, const Handle_OpenGl_Context&):
[user path removed]/occt671/adm/cmake/TKOpenGl/../../../inc/OpenGl_Workspace.hxx:455: warning: OpenGl_Workspace::PolygonOffset_applied will be initialized after
[user path removed]/occt671/adm/cmake/TKOpenGl/../../../inc/OpenGl_Workspace.hxx:453: warning: OpenGl_Matrix OpenGl_Workspace::myModelViewMatrix
[user path removed]/occt671/src/OpenGl/OpenGl_Workspace.cxx:139: warning: when initialized here
[user path removed]/occt671/src/MeshVS/MeshVS_Mesh.cxx: In member function virtual void MeshVS_Mesh::ComputeSelection(const Handle_SelectMgr_Selection&, Standard_Integer):
[user path removed]/occt671/src/MeshVS/MeshVS_Mesh.cxx:313: warning: min[2] may be used uninitialized in this function
[user path removed]/occt671/src/MeshVS/MeshVS_Mesh.cxx:313: warning: min[1] may be used uninitialized in this function
[user path removed]/occt671/src/MeshVS/MeshVS_Mesh.cxx:313: warning: min[0] may be used uninitialized in this function
[user path removed]/occt671/src/MeshVS/MeshVS_Mesh.cxx:313: warning: max[2] may be used uninitialized in this function
[user path removed]/occt671/src/MeshVS/MeshVS_Mesh.cxx:313: warning: max[1] may be used uninitialized in this function
[user path removed]/occt671/src/MeshVS/MeshVS_Mesh.cxx:313: warning: max[0] may be used uninitialized in this function
[user path removed]/occt671/src/ViewerTest/ViewerTest_ViewerCommands.cxx: In function int ViewerMainLoop(Standard_Integer, const char**):
[user path removed]/occt671/src/ViewerTest/ViewerTest_ViewerCommands.cxx:2160: warning: comparison between signed and unsigned integer expressions

Public activity

3 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Fix pushed to CR24877, please review
02Commenter 2
Patch looks OK.
03Commenter 3
Dear Commenter 1,

Branch CR24877 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]

Number of compiler warnings:

occt component :
Linux: 17 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 353128116 / 353522588
Total CPU difference: 58763.439999999726 / 53011.819999999796

Testing on Windows:
Total MEMORY difference: 379495680 / 379829796
Total CPU difference: 35744.90625 / 36615.125

There are no differences in images found by testdiff.