Archived issue #0026852
Coding - compiler warnings issued by GCC 5.2.1
Description
When building OCCT on Ubuntu with GCC 5.2.1 with -Wextra, several new compiler warnings are reported:
cc1plus: warning: function may return address of local variable [-Wreturn-local-addr]
[user path removed]/occt/src/BRepAlgo/BRepAlgo_DSAccess.cxx:446:24: note: declared here
TopTools_ListOfShape Result;
^
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1004:19: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1004:29: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1005:19: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1005:29: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1006:19: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1006:29: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1007:19: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1007:29: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[1]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[2]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[3]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[4]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[5]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[6]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[7]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[8]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[9]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntTools/IntTools_EdgeEdge.cxx:719:21: warning: ‘aT2Min’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntTools/IntTools_EdgeEdge.cxx:725:28: warning: ‘aT1Min’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/OSD/OSD_signal.cxx:336:35: warning: unused parameter ‘theSignal’ [-Wunused-parameter]
[user path removed]/occt/src/STEPConstruct/STEPConstruct_GDTProperty.cxx:169:53: warning: parameter ‘theHolle’ set but not used [-Wunused-but-set-parameter]
[user path removed]/occt/src/STEPConstruct/STEPConstruct_GDTProperty.cxx:170:76: warning: parameter ‘theFV’ set but not used [-Wunused-but-set-parameter]
[user path removed]/occt/src/STEPConstruct/STEPConstruct_GDTProperty.cxx:171:69: warning: parameter ‘theG’ set but not used [-Wunused-but-set-parameter]
[user path removed]/occt/src/OpenGl/OpenGl_AspectFace.cxx:47:3: warning: missing initializer for member ‘OPENGL_SURF_PROP::BSDF’ [-Wmissing-field-initializers]
[user path removed]/occt/src/OpenGl/OpenGl_AspectMarker.cxx:250:1: warning: missing initializer for member ‘PM_FONT_INFO::height’ [-Wmissing-field-initializers]
[user path removed]/occt/src/OpenGl/OpenGl_AspectMarker.cxx:250:1: warning: missing initializer for member ‘PM_FONT_INFO::offset’ [-Wmissing-field-initializers]
[user path removed]/occt/src/OpenGl/OpenGl_GraphicDriver.cxx:496:3: warning: missing initializer for member ‘Graphic3d_CAspectText::ShaderProgram’ [-Wmissing-field-initializers]
[user path removed]/occt/src/OpenGl/OpenGl_Trihedron.cxx:200:120: warning: missing initializer for member ‘Graphic3d_CAspectLine::ShaderProgram’ [-Wmissing-field-initializers]
cc1plus: warning: function may return address of local variable [-Wreturn-local-addr]
[user path removed]/occt/src/BRepAlgo/BRepAlgo_DSAccess.cxx:446:24: note: declared here
TopTools_ListOfShape Result;
^
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1004:19: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1004:29: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1005:19: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1005:29: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1006:19: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1006:29: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1007:19: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/Intf/Intf_Tool.cxx:1007:29: warning: array subscript is above array bounds [-Warray-bounds]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[1]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[2]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[3]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[4]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[5]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[6]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[7]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[8]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[9]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntTools/IntTools_EdgeEdge.cxx:719:21: warning: ‘aT2Min’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/IntTools/IntTools_EdgeEdge.cxx:725:28: warning: ‘aT1Min’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[user path removed]/occt/src/OSD/OSD_signal.cxx:336:35: warning: unused parameter ‘theSignal’ [-Wunused-parameter]
[user path removed]/occt/src/STEPConstruct/STEPConstruct_GDTProperty.cxx:169:53: warning: parameter ‘theHolle’ set but not used [-Wunused-but-set-parameter]
[user path removed]/occt/src/STEPConstruct/STEPConstruct_GDTProperty.cxx:170:76: warning: parameter ‘theFV’ set but not used [-Wunused-but-set-parameter]
[user path removed]/occt/src/STEPConstruct/STEPConstruct_GDTProperty.cxx:171:69: warning: parameter ‘theG’ set but not used [-Wunused-but-set-parameter]
[user path removed]/occt/src/OpenGl/OpenGl_AspectFace.cxx:47:3: warning: missing initializer for member ‘OPENGL_SURF_PROP::BSDF’ [-Wmissing-field-initializers]
[user path removed]/occt/src/OpenGl/OpenGl_AspectMarker.cxx:250:1: warning: missing initializer for member ‘PM_FONT_INFO::height’ [-Wmissing-field-initializers]
[user path removed]/occt/src/OpenGl/OpenGl_AspectMarker.cxx:250:1: warning: missing initializer for member ‘PM_FONT_INFO::offset’ [-Wmissing-field-initializers]
[user path removed]/occt/src/OpenGl/OpenGl_GraphicDriver.cxx:496:3: warning: missing initializer for member ‘Graphic3d_CAspectText::ShaderProgram’ [-Wmissing-field-initializers]
[user path removed]/occt/src/OpenGl/OpenGl_Trihedron.cxx:200:120: warning: missing initializer for member ‘Graphic3d_CAspectLine::ShaderProgram’ [-Wmissing-field-initializers]
Public activity
6 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sun Nov 8 19:29:24 2015 +0300
0026852: Coding - compiler warnings issued by GCC 5.2.1
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sun Nov 8 19:29:24 2015 +0300
0026852: Coding - compiler warnings issued by GCC 5.2.1
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Correction pushed to CR26852, please review
Please test the patch.
Branch [archived branch] has been deleted by Commenter 3.
[revision removed]
[revision removed]
Related records