View Issue Details

IDProjectCategoryView StatusLast Update
0025621Open CASCADEOCCT:Codingpublic2015-05-14 15:33
ReporteraznAssigned Toabv  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.7.0 
Target Version6.9.0Fixed in Version6.9.0 
Summary0025621: CAST analysis: Avoid constructors not supplying an initial value for all non-static data members
DescriptionEach constructor must initialize all member data items. Explicit initialization reduces the risk of an invalid state after successful construction. All virtual base classes, direct non-virtual base classes and non-static data members should be included in the initialization list for the constructor. For many constructors this means that the body becomes an empty block.
Steps To Reproducenot applicable
Additional information
and documentation updates
More details: CAST report, issue 7932
TagsNo tags attached.
Test case numberNot needed

Activities

git

2014-12-25 14:23

administrator   ~0035713

Branch CR25621 has been created by azn.

SHA-1: 9d1389574c301b52c100008dc61a3abd8b5e1764


Detailed log of new commits:

Author: azn
Date: Thu Dec 25 10:00:13 2014 +0300

    0025621: CAST analysis: Avoid constructors not supplying an initial value for all non-static data members
    
    The constructors of classes from following files have been fixed:
    
        Adaptor2d_Line2d.cxx
        Adaptor3d_IsoCurve.cxx
        Adaptor3d_OffsetCurve.cxx
        AdvApp2Var_ApproxAFunc2Var.cxx
        AIS_Dimension.cxx
        AIS_InteractiveContext.cxx
        Aspect_DisplayConnection.cxx
        BiTgte_CurveOnEdge.cxx
        BiTgte_CurveOnVertex.cxx
        BRepAdaptor_CompCurve.cxx
        BRepMesh_Circle.hxx
        BRepMesh_Delaun.cxx
        BRepToIGES_BREntity.cxx
        ChFi2d_AnaFilletAlgo.cxx
        ChFi2d_ChamferAPI.cxx
        ChFi2d_FilletAlgo.cxx
        ChFi2d_FilletAlgo.hxx
        Extrema_ExtPExtS.cxx
        Font_FTFont.cxx
        GccEnt_QualifiedCirc.cxx
        Geom2dAdaptor_Curve.cxx
        IGESData_IGESEntity.cxx
        IGESData_DefSwitch.cxx
        IGESToBRep_CurveAndSurface.cxx
        LDOM_XmlReader.cxx
        math_TrigonometricFunctionRoots.cxx
        NCollection_ListNode.hxx
        ProjLib_CompProjectedCurve.cxx
        ProjLib_ComputeApproxOnPolarSurface.cxx
        Select3D_Box2d.hxx
        Select3D_PointData.hxx

abv

2014-12-25 14:51

manager   ~0035717

First remark, in Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve:
- first: there should be no need to initialize myCurve by NULL, it is handle and has default constructor
- second: myFirst and myLast are mot set properly

git

2014-12-25 16:05

administrator   ~0035728

Branch CR25621 has been updated by azn.

SHA-1: 2f4931f5303c5cbbb15a511dfd1219b55b097751


Detailed log of new commits:

Author: azn
Date: Thu Dec 25 16:05:28 2014 +0300

    0025621: CAST analysis: Avoid constructors not supplying an initial value for all non-static data members
    
    Delete Handles initializations.

abv

2014-12-25 16:55

manager   ~0035732

No remarks, please test

mkv

2014-12-29 14:39

tester   ~0035833

Dear BugMaster,
Branch CR25621 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 2f4931f5303c5cbbb15a511dfd1219b55b097751

Number of compiler warnings:

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

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 367272204 / 367862128
Total CPU difference: 48803.300000000294 / 51444.81000000015
products component :
Total MEMORY difference: 112391796 / 112474236
Total CPU difference: 16460.709999999977 / 16870.879999999983

Testing on Windows:
occt component :
Total MEMORY difference: 277460644 / 277277864
Total CPU difference: 34788.3125 / 37472.0935757
products component :
Total MEMORY difference: 72282380 / 71352468
Total CPU difference: 10229.046875 / 10337.547159399997

There are no differences in images found by testdiff.

git

2015-01-15 16:36

administrator   ~0036113

Branch CR25621 has been updated forcibly by azn.

SHA-1: b233f492ac651dfa1921fcecd2ea07d38fb6f7df

git

2015-01-26 12:32

administrator   ~0036519

Branch CR25621 has been deleted by inv.

SHA-1: b233f492ac651dfa1921fcecd2ea07d38fb6f7df

Related Changesets

occt: master cbff1e55

2014-12-25 07:00:13

abv


Committer: abv Details Diff
0025621: CAST analysis - Avoid constructors not supplying an initial value for all non-static data members

The constructors of classes from following files have been fixed to ensure that all non-static fields are initialized:

Adaptor2d_Line2d.cxx
Adaptor3d_IsoCurve.cxx
Adaptor3d_OffsetCurve.cxx
AdvApp2Var_ApproxAFunc2Var.cxx
AIS_Dimension.cxx
AIS_InteractiveContext.cxx
Aspect_DisplayConnection.cxx
BiTgte_CurveOnEdge.cxx
BiTgte_CurveOnVertex.cxx
BRepAdaptor_CompCurve.cxx
BRepMesh_Circle.hxx
BRepMesh_Delaun.cxx
BRepToIGES_BREntity.cxx
ChFi2d_AnaFilletAlgo.cxx
ChFi2d_ChamferAPI.cxx
ChFi2d_FilletAlgo.cxx
ChFi2d_FilletAlgo.hxx
Extrema_ExtPExtS.cxx
Font_FTFont.cxx
GccEnt_QualifiedCirc.cxx
Geom2dAdaptor_Curve.cxx
IGESData_IGESEntity.cxx
IGESData_DefSwitch.cxx
IGESToBRep_CurveAndSurface.cxx
LDOM_XmlReader.cxx
math_TrigonometricFunctionRoots.cxx
NCollection_ListNode.hxx
ProjLib_CompProjectedCurve.cxx
ProjLib_ComputeApproxOnPolarSurface.cxx
Select3D_Box2d.hxx
Select3D_PointData.hxx
Affected Issues
0025621
mod - src/Adaptor2d/Adaptor2d_Line2d.cxx Diff File
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/AIS/AIS_Dimension.cxx Diff File
mod - src/AIS/AIS_InteractiveContext.cxx Diff File
mod - src/BiTgte/BiTgte_CurveOnEdge.cxx Diff File
mod - src/BiTgte/BiTgte_CurveOnVertex.cxx Diff File
mod - src/BRepAdaptor/BRepAdaptor_CompCurve.cxx Diff File
mod - src/BRepMesh/BRepMesh_Circle.hxx Diff File
mod - src/BRepMesh/BRepMesh_Delaun.cxx Diff File
mod - src/BRepToIGES/BRepToIGES_BREntity.cxx Diff File
mod - src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx Diff File
mod - src/ChFi2d/ChFi2d_ChamferAPI.cxx Diff File
mod - src/ChFi2d/ChFi2d_FilletAlgo.cxx Diff File
mod - src/ChFi2d/ChFi2d_FilletAlgo.hxx Diff File
mod - src/Extrema/Extrema_ExtPExtS.cxx Diff File
mod - src/Font/Font_FTFont.cxx Diff File
mod - src/GccEnt/GccEnt_QualifiedCirc.cxx Diff File
mod - src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx Diff File
mod - src/IGESData/IGESData_DefSwitch.cxx Diff File
mod - src/IGESData/IGESData_IGESEntity.cxx Diff File
mod - src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx Diff File
mod - src/LDOM/LDOM_XmlReader.cxx Diff File
mod - src/math/math_TrigonometricFunctionRoots.cxx Diff File
mod - src/NCollection/NCollection_ListNode.hxx Diff File
mod - src/ProjLib/ProjLib_CompProjectedCurve.cxx Diff File
mod - src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx Diff File
mod - src/Select3D/Select3D_Box2d.hxx Diff File
mod - src/Select3D/Select3D_PointData.hxx Diff File

Issue History

Date Modified Username Field Change
2014-12-16 17:58 azn New Issue
2014-12-16 17:58 azn Assigned To => azn
2014-12-25 14:23 git Note Added: 0035713
2014-12-25 14:24 azn Assigned To azn => abv
2014-12-25 14:24 azn Status new => resolved
2014-12-25 14:24 azn Steps to Reproduce Updated
2014-12-25 14:51 abv Note Added: 0035717
2014-12-25 14:51 abv Assigned To abv => azn
2014-12-25 14:51 abv Status resolved => assigned
2014-12-25 16:05 git Note Added: 0035728
2014-12-25 16:14 azn Assigned To azn => abv
2014-12-25 16:14 azn Status assigned => resolved
2014-12-25 16:55 abv Note Added: 0035732
2014-12-25 16:55 abv Assigned To abv => bugmaster
2014-12-25 16:55 abv Status resolved => reviewed
2014-12-25 18:01 mkv Assigned To bugmaster => mkv
2014-12-29 14:39 mkv Note Added: 0035833
2014-12-29 14:39 mkv Assigned To mkv => bugmaster
2014-12-29 14:39 mkv Status reviewed => tested
2014-12-29 14:40 mkv Test case number => Not needed
2015-01-15 16:36 git Note Added: 0036113
2015-01-16 13:37 abv Changeset attached => occt master cbff1e55
2015-01-16 13:37 abv Assigned To bugmaster => abv
2015-01-16 13:37 abv Status tested => verified
2015-01-16 13:37 abv Resolution open => fixed
2015-01-26 12:32 git Note Added: 0036519
2015-05-14 15:29 aiv Status verified => closed
2015-05-14 15:33 aiv Fixed in Version => 6.9.0