MantisBT - Open CASCADE
View Issue Details
0027643Open CASCADE[OCCT] OCCT:Codingpublic2016-06-26 19:232016-12-09 16:38
kgv 
bugmaster 
normaltrivial 
closedfixed 
[OCCT] 7.0.0 
[OCCT] 7.1.0[OCCT] 7.1.0 
Not needed
0027643: Coding rules - eliminate GCC warning -Wmaybe-uninitialized
The following warning appear when compiling current OCCT master:
In file included from C:\occt\src\GCPnts\GCPnts_AbscissaPoint.cxx:39:0:
C:\occt\src\GCPnts\GCPnts_AbscissaPoint.pxx: In static member function 'static Standard_Real GCPnts_AbscissaPoint::Length(const 
Adaptor3d_Curve&, Standard_Real, Standard_Real)':
C:\occt\src\GCPnts\GCPnts_AbscissaPoint.pxx:320:25: warning: 'Ratio' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
     return Abs(U2-U1) * Ratio;
                         ^
C:\occt\src\GCPnts\GCPnts_AbscissaPoint.pxx: In static member function 'static Standard_Real GCPnts_AbscissaPoint::Length(const 
Adaptor3d_Curve&, Standard_Real, Standard_Real, Standard_Real)':
C:\occt\src\GCPnts\GCPnts_AbscissaPoint.pxx:361:25: warning: 'Ratio' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
     return Abs(U2-U1) * Ratio;
                         ^
C:\occt\src\GCPnts\GCPnts_AbscissaPoint.pxx: In function 'void AdvCompute(CPnts_AbscissaPoint&, const 
Adaptor3d_Curve&, Standard_Real&, Standard_Real&, Standard_Real&, Standard_Real)':
C:\occt\src\GCPnts\GCPnts_AbscissaPoint.pxx:175:42: warning: 'Ratio' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
     theComputer.SetParameter(U0 + Abscis / Ratio);
                                          ^
C:\occt\src\GeomFill\GeomFill_SectionPlacement.cxx: In member function 'void GeomFill_SectionPlacement::Perform(const 
opencascade::handle<Adaptor3d_HCurve>&, Standard_Real)':
C:\occt\src\GeomFill\GeomFill_SectionPlacement.cxx:669:19: warning: 'taux' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
   PathParam = taux;
                   ^


on gcc compiler:
aarch64-linux-android-g++.exe (GCC) 4.9.x 20150123 (prerelease)
No tags attached.
Issue History
2016-06-26 19:23kgvNew Issue
2016-06-26 19:23kgvAssigned To => kgv
2016-06-26 19:29kgvDescription Updatedbug_revision_view_page.php?rev_id=14050#r14050
2016-06-26 20:10gitNote Added: 0055480
2016-06-26 20:11kgvNote Added: 0055481
2016-06-26 20:11kgvAssigned Tokgv => bugmaster
2016-06-26 20:11kgvSeverityminor => trivial
2016-06-26 20:11kgvStatusnew => resolved
2016-06-26 20:11kgvStatusresolved => reviewed
2016-06-27 13:31mkvAssigned Tobugmaster => mkv
2016-06-27 20:43mkvNote Added: 0055517
2016-06-27 20:43mkvNote Added: 0055518
2016-06-27 20:43mkvAssigned Tomkv => bugmaster
2016-06-27 20:43mkvStatusreviewed => tested
2016-06-27 20:43mkvTest case number => Not needed
2016-07-01 17:19bugmasterChangeset attached => occt master 576e3066
2016-07-01 17:19bugmasterStatustested => verified
2016-07-01 17:19bugmasterResolutionopen => fixed
2016-07-22 10:45gitNote Added: 0056127
2016-12-09 16:31aivStatusverified => closed
2016-12-09 16:38aivFixed in Version => 7.1.0

Notes
(0055480)
git   
2016-06-26 20:10   
Branch CR27643 has been created by kgv.

SHA-1: adcf1d18a989c5a57b307d9cdc9f760cf3c69017


Detailed log of new commits:

Author: kgv
Date: Sun Jun 26 20:10:35 2016 +0300

    0027643: Coding rules - eliminate GCC warning -Wmaybe-uninitialized
(0055481)
kgv   
2016-06-26 20:11   
Please test the patch.
(0055517)
mkv   
2016-06-27 20:43   
Dear BugMaster,
Branch CR27643 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: adcf1d18a989c5a57b307d9cdc9f760cf3c69017

Number of compiler warnings:

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

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1150

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 88588680 / 88709444 [-0.14%]
Total CPU difference: 19408.199999999866 / 19559.91999999992 [-0.78%]
products component :
Total MEMORY difference: 27450133 / 27390508 [+0.22%]
Total CPU difference: 5175.459999999996 / 5182.479999999985 [-0.14%]

Testing on Windows:
occt component :
Total MEMORY difference: 55889748 / 55895183 [-0.01%]
Total CPU difference: 18294.518071798844 / 17842.068371498677 [+2.54%]
products component :
Total MEMORY difference: 18612816 / 18577733 [+0.19%]
Total CPU difference: 5027.3194261999515 / 4930.286804199938 [+1.97%]

There are no differences in images found by testdiff.
(0055518)
mkv   
2016-06-27 20:43   
Dear BugMaster,
Branch CR27643 is TESTED.
(0056127)
git   
2016-07-22 10:45   
Branch CR27643 has been deleted by inv.

SHA-1: adcf1d18a989c5a57b307d9cdc9f760cf3c69017