View Issue Details

IDProjectCategoryView StatusLast Update
0024275Open CASCADEOCCT:Codingpublic2013-12-19 13:59
ReporterabvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.7.0 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024275: Cppcheck warnings on uninitialized class members
DescriptionCppcheck reports about 350 warnings on uninitialized class members in current OCCT master. See attached log for details. Providing good default initializes for these members could protect against possible use of uninitialized values which cannot be controlled by compiler.
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • cppcheck-uninitMemberVar.txt (47,775 bytes)

Activities

abv

2013-10-21 13:37

manager  

cppcheck-uninitMemberVar.txt (47,775 bytes)

ski

2013-10-29 14:58

developer   ~0026331

Most part of cppcheck warings were removed.
Changes are located in branch CR24275.
Please, review.

abv

2013-10-30 09:44

manager   ~0026353

No remarks, please check

mkv

2013-10-30 14:13

tester   ~0026363

Dear BugMaster,

Branch CR24275 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 87695738f52265314d4ccc4b82b81922a206ca76

Number of compiler warnings:

occt component :
Linux: 323 (323 on master)
Windows: 13 (0 on master)

New additional compilation warnings on Windows platform:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/job/mnt-CR24275-master_build_occt_windows/1/warnings28Result/?

OSD_Path.cxx:1047, MSBuild, Priority: High
'whereAmI': identifier not found

OSD_Path.cxx:1114, MSBuild, Priority: High
'whereAmI': identifier not found

products component :
Linux: 189 (189 on master)
Windows: 287 (287 on master)

abv

2013-10-30 16:02

manager   ~0026369

No remarks, please test

mkv

2013-11-01 12:25

tester   ~0026418

Dear BugMaster,

Branch CR24275 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: e8abe7a807b83edeb2f1b2ccdad5330122e8a3c3

Number of compiler warnings:

occt component :
Linux: 337 (323 on master)
Windows: 0 (0 on master)

15 additional warnings on Linux platform:

GNU Compiler Warnings - Source Folder ../../../../inc
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/job/mnt-CR24275-master_build_occt_linux/1/warnings15Result/package.-671474530/

Double warning
BOPCol_Array1.hxx:187

BRepGProp_Face.hxx:161, GNU Compiler 4 (gcc), Priority: Normal
‘Standard_Boolean BRepGProp_Face::mySReverse’

BRepGProp_Face.hxx:162, GNU Compiler 4 (gcc), Priority: Normal
‘BRepGProp_Face::myIsUseSpan’ will be initialized after

BRepGProp_Face.lxx:29, GNU Compiler 4 (gcc), Priority: Normal
when initialized here

Graphic3d_CGraduatedTrihedron.hxx:37, GNU Compiler 4 (gcc), Priority: Normal
when initialized here

Graphic3d_CGraduatedTrihedron.hxx:65, GNU Compiler 4 (gcc), Priority: Normal
‘Standard_Boolean Graphic3d_CGraduatedTrihedron::xdrawname’

Graphic3d_CGraduatedTrihedron.hxx:103, GNU Compiler 4 (gcc), Priority: Normal
‘Graphic3d_CGraduatedTrihedron::ptrVisual3dView’ will be initialized after

Double warning
NCollection_DataMap.hxx:183

Double warning
NCollection_IndexedDataMap.hxx:236

Double warning
NCollection_IndexedMap.hxx:228

Double warning
NCollection_Map.hxx:187

Double warning
NCollection_Map.hxx:213

Double warning
TCollection_Array2.gxx:127


products component :
Linux: 189 (189 on master)
Windows: 287 (287 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 356047620 / 356295124
Total CPU difference: 43411.47000000095 / 40672.21000000072

Testing on Windows:
Total MEMORY difference: 407437496 / 406499704
Total CPU difference: 29393.828125 / 34773.5

There are not differences in images found by testdiff.

abv

2013-11-06 14:19

manager   ~0026475

No remarks, please test

mkv

2013-11-06 15:11

tester   ~0026478

Dear abv,
could you please rebase CR24275 to current master, there are conflict files.

ski

2013-11-06 16:50

developer   ~0026493

Last edited: 2013-11-06 16:50

Branch CR24275 was rebased to current master.

mkv

2013-11-12 07:04

tester   ~0026555

Dear BugMaster,

Branch CR24275 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 0cb6b3dc787e7d7cf06db7aa1ce4903ce80efcc0

Number of compiler warnings:

occt component :
Linux: 318 (318 on master)
Windows: 0 (0 on master)

products component :
Linux: 188 (188 on master)
Windows: 287 (287 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 356362408 / 356493764
Total CPU difference: 42206.56000000061 / 42449.46000000157

Testing on Windows:
Total MEMORY difference: 411727832 / 410787992
Total CPU difference: 31485.609375 / 30177.328125

There are not differences in images found by testdiff.

Related Changesets

occt: master c24d4017

2013-11-14 07:08:41

ski


Committer: bugmaster Details Diff
0024275: Cppcheck warnings on uninitialized class members
Removed warning of cppcheck on uninitialized class members for non-array cases
New additional compilation warnings on Windows platform from file OSD_Path.cxx were fixed
Warnings about wrong initialization removed
Affected Issues
0024275
mod - src/Adaptor3d/Adaptor3d_IsoCurve.cxx Diff File
mod - src/Adaptor3d/Adaptor3d_OffsetCurve.cxx Diff File
mod - src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx Diff File
mod - src/Bnd/Bnd_BoundSortBox.cxx Diff File
mod - src/BRepFeat/BRepFeat_Form.lxx Diff File
mod - src/BRepFeat/BRepFeat_MakeCylindricalHole.lxx Diff File
mod - src/BRepGProp/BRepGProp_Face.lxx Diff File
mod - src/BRepMesh/BRepMesh_Triangle.cxx Diff File
mod - src/ChFi2d/ChFi2d_ChamferAPI.cxx Diff File
mod - src/ChFi2d/ChFi2d_FilletAlgo.hxx Diff File
mod - src/CPnts/CPnts_MyGaussFunction.lxx Diff File
mod - src/CPnts/CPnts_MyRootFunction.lxx Diff File
mod - src/DDF/DDF_IOStream.cxx Diff File
mod - src/Draw/Draw_Interpretor.cxx Diff File
mod - src/Draw/Draw_Viewer.cxx Diff File
mod - src/GCPnts/GCPnts_QuasiUniformAbscissa.cxx Diff File
mod - src/GCPnts/GCPnts_UniformAbscissa.cxx Diff File
mod - src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.cxx Diff File
mod - src/GeomFill/GeomFill_DiscreteTrihedron.cxx Diff File
mod - src/GeomInt/GeomInt_IntSS_1.cxx Diff File
mod - src/GProp/GProp_VGPropsGK.lxx Diff File
mod - src/Graphic3d/Graphic3d_CGraduatedTrihedron.hxx Diff File
mod - src/Graphic3d/Graphic3d_CGroup.hxx Diff File
mod - src/Graphic3d/Graphic3d_CView.hxx Diff File
mod - src/IntCurve/IntCurve_IntConicConic_Tool.cxx Diff File
mod - src/IntTools/IntTools_EdgeEdge_1.cxx Diff File
mod - src/LDOM/LDOM_XmlReader.cxx Diff File
mod - src/LocOpe/LocOpe_Gluer.lxx Diff File
mod - src/OpenGl/OpenGl_TextFormatter.cxx Diff File
mod - src/OSD/OSD_Error.cxx Diff File
mod - src/OSD/OSD_Path.cxx Diff File
mod - src/PBRep/PBRep_TEdge.cxx Diff File
mod - src/PBRep/PBRep_TEdge1.cxx Diff File
mod - src/PBRep/PBRep_TFace.cxx Diff File
mod - src/PBRep/PBRep_TFace1.cxx Diff File
mod - src/PBRep/PBRep_TVertex.cxx Diff File
mod - src/PBRep/PBRep_TVertex1.cxx Diff File
mod - src/PCDM/PCDM_ReferenceIterator.cxx Diff File
mod - src/PDataStd/PDataStd_BooleanArray.cxx Diff File
mod - src/PDataStd/PDataStd_ByteArray_1.cxx Diff File
mod - src/PDataStd/PDataStd_ExtStringArray_1.cxx Diff File
mod - src/PDataStd/PDataStd_Integer.cxx Diff File
mod - src/PDataStd/PDataStd_IntegerArray_1.cxx Diff File
mod - src/PDataStd/PDataStd_IntPackedMap_1.cxx Diff File
mod - src/PDataStd/PDataStd_Real.cxx Diff File
mod - src/PDataStd/PDataStd_RealArray_1.cxx Diff File
mod - src/PDataStd/PDataStd_Variable.cxx Diff File
mod - src/PDataXtd/PDataXtd_Constraint.cxx Diff File
mod - src/PDataXtd/PDataXtd_Geometry.cxx Diff File
mod - src/PDataXtd/PDataXtd_PatternStd.cxx Diff File
mod - src/PDF/PDF_Data.cxx Diff File
mod - src/PDF/PDF_TagSource.cxx Diff File
mod - src/PNaming/PNaming_Name.cxx Diff File
mod - src/PNaming/PNaming_NamedShape.cxx Diff File
mod - src/PNaming/PNaming_Name_1.cxx Diff File
mod - src/PNaming/PNaming_Name_2.cxx Diff File
mod - src/PPrsStd/PPrsStd_AISPresentation.cxx Diff File
mod - src/PPrsStd/PPrsStd_AISPresentation_1.cxx Diff File
mod - src/ProjLib/ProjLib_ProjectOnPlane.cxx Diff File
mod - src/PTopoDS/PTopoDS_HShape.cxx Diff File
mod - src/PTopoDS/PTopoDS_Shape1.cxx Diff File
mod - src/PTopoDS/PTopoDS_TShape.cxx Diff File
mod - src/PXCAFDoc/PXCAFDoc_Area.cxx Diff File
mod - src/PXCAFDoc/PXCAFDoc_DimTol.cxx Diff File
mod - src/PXCAFDoc/PXCAFDoc_Material.cxx Diff File
mod - src/PXCAFDoc/PXCAFDoc_Volume.cxx Diff File
mod - src/Standard/Standard_ErrorHandlerCallback.lxx Diff File
mod - src/STEPCAFControl/STEPCAFControl_Reader.cxx Diff File
mod - src/StepVisual/StepVisual_DirectionCountSelect.cxx Diff File
mod - src/TestTopOpe/TestTopOpe_MiscBOOP.cxx Diff File
mod - src/TestTopOpe/TestTopOpe_VarsTopo.cxx Diff File
mod - src/TNaming/TNaming_Name.cxx Diff File
mod - src/TObj/TObj_Application.cxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_LineInter.lxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_VPointInter.lxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_FuseFace.lxx Diff File
mod - src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.cxx Diff File
mod - src/VrmlData/VrmlData_TextureTransform.hxx Diff File

Issue History

Date Modified Username Field Change
2013-10-21 13:37 abv New Issue
2013-10-21 13:37 abv Assigned To => bugmaster
2013-10-21 13:37 abv File Added: cppcheck-uninitMemberVar.txt
2013-10-21 13:38 abv Assigned To bugmaster => ski
2013-10-21 13:38 abv Status new => assigned
2013-10-29 14:58 ski Note Added: 0026331
2013-10-29 14:58 ski Assigned To ski => abv
2013-10-29 14:58 ski Status assigned => resolved
2013-10-30 09:44 abv Note Added: 0026353
2013-10-30 09:44 abv Assigned To abv => bugmaster
2013-10-30 09:44 abv Status resolved => reviewed
2013-10-30 10:51 mkv Assigned To bugmaster => mkv
2013-10-30 14:13 mkv Note Added: 0026363
2013-10-30 14:13 mkv Test case number => Not needed
2013-10-30 14:13 mkv Assigned To mkv => ski
2013-10-30 14:13 mkv Status reviewed => assigned
2013-10-30 15:53 ski Assigned To ski => abv
2013-10-30 15:53 ski Status assigned => resolved
2013-10-30 16:02 abv Note Added: 0026369
2013-10-30 16:02 abv Assigned To abv => bugmaster
2013-10-30 16:02 abv Status resolved => reviewed
2013-10-31 08:13 mkv Assigned To bugmaster => mkv
2013-11-01 12:25 mkv Note Added: 0026418
2013-11-01 12:26 mkv Assigned To mkv => abv
2013-11-01 12:26 mkv Status reviewed => assigned
2013-11-01 13:34 abv Assigned To abv => ski
2013-11-06 14:14 ski Assigned To ski => abv
2013-11-06 14:14 ski Status assigned => resolved
2013-11-06 14:19 abv Note Added: 0026475
2013-11-06 14:19 abv Assigned To abv => bugmaster
2013-11-06 14:19 abv Status resolved => reviewed
2013-11-06 14:26 mkv Assigned To bugmaster => mkv
2013-11-06 15:11 mkv Note Added: 0026478
2013-11-06 15:11 mkv Assigned To mkv => abv
2013-11-06 15:11 mkv Status reviewed => feedback
2013-11-06 15:27 mkv Assigned To abv => ski
2013-11-06 16:49 ski Assigned To ski => bugmaster
2013-11-06 16:49 ski Status feedback => reviewed
2013-11-06 16:49 ski Assigned To bugmaster => mkv
2013-11-06 16:50 ski Note Added: 0026493
2013-11-06 16:50 ski Note Edited: 0026493
2013-11-07 15:18 ski Note View State: 0026493: public
2013-11-12 07:04 mkv Note Added: 0026555
2013-11-12 07:04 mkv Assigned To mkv => bugmaster
2013-11-12 07:04 mkv Status reviewed => tested
2013-11-15 10:24 bugmaster Changeset attached => occt master c24d4017
2013-11-15 10:24 bugmaster Status tested => verified
2013-11-15 10:24 bugmaster Resolution open => fixed
2013-12-19 13:51 bugmaster Status verified => closed
2013-12-19 13:59 bugmaster Fixed in Version => 6.7.0
2014-01-11 11:58 abv Category OCCT Release:BUILD => OCCT:Coding