MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #27643 All Revisions ] Back to Issue ]
Summary 0027643: Coding rules - eliminate GCC warning -Wmaybe-uninitialized
Revision 2016-06-26 19:29 by kgv
Description 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)
Revision 2016-06-26 19:23 by kgv
Description 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);
                                          ^
In file included from C:\occt\src\GCPnts\GCPnts_AbscissaPoint.cxx:52:0:
C:\occt\src\GCPnts\GCPnts_AbscissaPoint.pxx: In static member function 'static Standard_Real GCPnts_AbscissaPoint::Length(const 
Adaptor2d_Curve2d&, 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 
Adaptor2d_Curve2d&, 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 
Adaptor2d_Curve2d&, 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)


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker