View Issue Details

IDProjectCategoryView StatusLast Update
0026852Open CASCADEOCCT:Codingpublic2016-05-26 15:48
Reporterabv Assigned Toabv  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026852: Coding - compiler warnings issued by GCC 5.2.1
DescriptionWhen 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]
/home/abv/occt/src/BRepAlgo/BRepAlgo_DSAccess.cxx:446:24: note: declared here
   TopTools_ListOfShape Result;
                        ^
/home/abv/occt/src/Intf/Intf_Tool.cxx:1004:19: warning: array subscript is above array bounds [-Warray-bounds]
/home/abv/occt/src/Intf/Intf_Tool.cxx:1004:29: warning: array subscript is above array bounds [-Warray-bounds]
/home/abv/occt/src/Intf/Intf_Tool.cxx:1005:19: warning: array subscript is above array bounds [-Warray-bounds]
/home/abv/occt/src/Intf/Intf_Tool.cxx:1005:29: warning: array subscript is above array bounds [-Warray-bounds]
/home/abv/occt/src/Intf/Intf_Tool.cxx:1006:19: warning: array subscript is above array bounds [-Warray-bounds]
/home/abv/occt/src/Intf/Intf_Tool.cxx:1006:29: warning: array subscript is above array bounds [-Warray-bounds]
/home/abv/occt/src/Intf/Intf_Tool.cxx:1007:19: warning: array subscript is above array bounds [-Warray-bounds]
/home/abv/occt/src/Intf/Intf_Tool.cxx:1007:29: warning: array subscript is above array bounds [-Warray-bounds]
/home/abv/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[1]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[2]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[3]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[4]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[5]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[6]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[7]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[8]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx:2528:34: warning: ‘aCriticalDelta[9]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntTools/IntTools_EdgeEdge.cxx:719:21: warning: ‘aT2Min’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/IntTools/IntTools_EdgeEdge.cxx:725:28: warning: ‘aT1Min’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/abv/occt/src/OSD/OSD_signal.cxx:336:35: warning: unused parameter ‘theSignal’ [-Wunused-parameter]
/home/abv/occt/src/STEPConstruct/STEPConstruct_GDTProperty.cxx:169:53: warning: parameter ‘theHolle’ set but not used [-Wunused-but-set-parameter]
/home/abv/occt/src/STEPConstruct/STEPConstruct_GDTProperty.cxx:170:76: warning: parameter ‘theFV’ set but not used [-Wunused-but-set-parameter]
/home/abv/occt/src/STEPConstruct/STEPConstruct_GDTProperty.cxx:171:69: warning: parameter ‘theG’ set but not used [-Wunused-but-set-parameter]

/home/abv/occt/src/OpenGl/OpenGl_AspectFace.cxx:47:3: warning: missing initializer for member ‘OPENGL_SURF_PROP::BSDF’ [-Wmissing-field-initializers]
/home/abv/occt/src/OpenGl/OpenGl_AspectMarker.cxx:250:1: warning: missing initializer for member ‘PM_FONT_INFO::height’ [-Wmissing-field-initializers]
/home/abv/occt/src/OpenGl/OpenGl_AspectMarker.cxx:250:1: warning: missing initializer for member ‘PM_FONT_INFO::offset’ [-Wmissing-field-initializers]
/home/abv/occt/src/OpenGl/OpenGl_GraphicDriver.cxx:496:3: warning: missing initializer for member ‘Graphic3d_CAspectText::ShaderProgram’ [-Wmissing-field-initializers]
/home/abv/occt/src/OpenGl/OpenGl_Trihedron.cxx:200:120: warning: missing initializer for member ‘Graphic3d_CAspectLine::ShaderProgram’ [-Wmissing-field-initializers]
TagsNo tags attached.
Test case number

Relationships

related to 0026854 closedabv Open CASCADE Use -Wextra with GCC 
related to 0027544 closedbugmaster Community problem compiling OCCT with gcc version 4.8.2 gives error 'array subscript is above array bounds' 

Activities

git

2015-11-08 19:30

administrator   ~0047924

Branch CR26852 has been created by abv.

SHA-1: a1fddce7f80d5c954177dc70634a359232be7d2c


Detailed log of new commits:

Author: abv
Date: Sun Nov 8 19:29:24 2015 +0300

    0026852: Coding - compiler warnings issued by GCC 5.2.1

git

2015-11-08 21:48

administrator   ~0047927

Branch CR26852 has been updated forcibly by abv.

SHA-1: b12e293f9a447cad8e8de7ae2d5f5e94fe40ec66

git

2015-11-08 21:53

administrator   ~0047928

Branch CR26852 has been updated forcibly by abv.

SHA-1: 30ce7ab427fddd9b122bea120f3b1f5048c61c20

abv

2015-11-08 22:01

manager   ~0047930

Correction pushed to CR26852, please review

kgv

2015-11-08 22:18

developer   ~0047932

Please test the patch.

git

2016-04-17 14:23

administrator   ~0053159

Branch CR26852 has been deleted by kgv.

SHA-1: 30ce7ab427fddd9b122bea120f3b1f5048c61c20

Related Changesets

occt: master 04e93070

2015-11-08 16:29:24

abv


Committer: abv Details Diff
0026852: Coding - compiler warnings issued by GCC 5.2.1

Compiler warnings eliminated:
- BRepAlgo_DSAccess: avoid copying of local list
- IntPatch, IntTools: initialize "possibly used uninitialized" variables by zeros
- Intf: slight refactoring
- OSD_signal: suppress unused argument
- OpenGL: add missing initializers in structures
- STEPConstruct_GDTProperty: correct function signature to pass output parameters by reference
Affected Issues
0026852
mod - src/BRepAlgo/BRepAlgo_DSAccess.cxx Diff File
mod - src/Intf/Intf_Tool.cxx Diff File
mod - src/IntPatch/IntPatch_ImpImpIntersection_4.gxx Diff File
mod - src/IntTools/IntTools_EdgeEdge.cxx Diff File
mod - src/OpenGl/OpenGl_AspectFace.cxx Diff File
mod - src/OpenGl/OpenGl_AspectMarker.cxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver.cxx Diff File
mod - src/OpenGl/OpenGl_Trihedron.cxx Diff File
mod - src/OSD/OSD_signal.cxx Diff File
mod - src/STEPConstruct/STEPConstruct_GDTProperty.cxx Diff File
mod - src/STEPConstruct/STEPConstruct_GDTProperty.hxx Diff File

Issue History

Date Modified Username Field Change
2015-11-08 19:27 abv New Issue
2015-11-08 19:27 abv Assigned To => kgv
2015-11-08 19:30 git Note Added: 0047924
2015-11-08 21:48 git Note Added: 0047927
2015-11-08 21:53 git Note Added: 0047928
2015-11-08 22:01 abv Status new => resolved
2015-11-08 22:01 abv Description Updated
2015-11-08 22:01 abv Additional Information Updated
2015-11-08 22:01 abv Note Added: 0047930
2015-11-08 22:01 abv Additional Information Updated
2015-11-08 22:18 kgv Note Added: 0047932
2015-11-08 22:18 kgv Assigned To kgv => bugmaster
2015-11-08 22:18 kgv Status resolved => reviewed
2015-11-09 07:48 abv Relationship added related to 0026854
2015-11-09 16:26 mkv Assigned To bugmaster => mkv
2015-11-13 11:53 abv Changeset attached => occt master 04e93070
2015-11-13 11:53 abv Assigned To mkv => abv
2015-11-13 11:53 abv Status reviewed => verified
2015-11-13 11:53 abv Resolution open => fixed
2016-04-17 14:23 git Note Added: 0053159
2016-04-20 15:42 aiv Fixed in Version => 7.0.0
2016-04-20 15:51 aiv Status verified => closed
2016-05-26 15:48 kgv Relationship added related to 0027544