MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #32437 All Revisions ] Back to Issue ]
Summary 0032437: Coding Rules - eliminate MinGW warning -Wmaybe-uninitialized
Revision 2021-06-12 15:57 by kgv
Description The following GNU 7.1.0 warnings should be eliminated:
E:\OCCT_SRC\src\Font\Font_TextFormatter.cxx: In member function 'Standard_Boolean Font_TextFormatter::IsLFSymbol(Standard_Integer) 
const':

E:\OCCT_SRC\src\Font\Font_TextFormatter.cxx:360:14: warning: 'aBndBox.Font_Rect::Right' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
   return Abs (aBndBox.Right - aBndBox.Left) < Precision::Confusion();
          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

E:\OCCT_SRC\src\TopOpeBRep\TopOpeBRep_LineInter.cxx: In member function 'Standard_Real TopOpeBRep_LineInter::Period() 
const':

E:\OCCT_SRC\src\TopOpeBRep\TopOpeBRep_LineInter.cxx:352:16: warning: 'l' may be used uninitialized in 
this function [-Wmaybe-uninitialized]
   return (l - f);
                ^

E:\OCCT_SRC\src\TopOpeBRep\TopOpeBRep_LineInter.cxx:352:16: warning: 'f' may be used uninitialized in 
this function

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx: In member function 'void TopOpeBRepDS_BuildTool::UpdateEdgeCurveTol(const 
TopoDS_Face&, const TopoDS_Face&, TopoDS_Edge&, const opencascade::handle<Geom_Curve>&, 
Standard_Real, Standard_Real, Standard_Real, Standard_Real&, Standard_Real&, Standard_Real&) 
const':

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx:480:17: warning: 'parmax' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
       newparmax = parmax;
       ~~~~~~~~~~^~~~~~~~

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx:479:17: warning: 'parmin' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
       newparmin = parmin;
       ~~~~~~~~~~^~~~~~~~
[ 50%] Building CXX object src/TKStd/CMakeFiles/TKStd.dir/__/ShapePersistent/ShapePersistent_BRep.cxx.obj

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx: In member function 'void TopOpeBRepDS_BuildTool::ApproxCurves(const 
TopOpeBRepDS_Curve&, TopoDS_Edge&, Standard_Integer&, const opencascade::handle<TopOpeBRepDS_HDataStructure>&) 
const':

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx:567:15: warning: 'parmax' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
     newparmax = parmax;
     ~~~~~~~~~~^~~~~~~~

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx:566:15: warning: 'parmin' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
     newparmin = parmin;
     ~~~~~~~~~~^~~~~~~~
     
E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx: In member function 'Standard_Integer AIS_ColorScale::computeMaxLabelWidth(const 
TColStd_SequenceOfExtendedString&) const':

E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx:917:20: warning: 'aWidth' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
   Standard_Integer aWidth, anAscent, aDescent;
                    ^~~~~~
E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx: In member function 'Standard_Integer AIS_ColorScale::TextWidth(const 
TCollection_ExtendedString&) const':

E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx:919:10: warning: 'aWidth' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
   return aWidth;
          ^~~~~~
E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx: In member function 'Standard_Integer AIS_ColorScale::TextHeight(const 
TCollection_ExtendedString&) const':

E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx:930:21: warning: 'aDescent' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
   return anAscent + aDescent;
                     ^~~~~~~~

E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx:930:21: warning: 'anAscent' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx: In member function 'void AIS_ColorScale::SizeHint(Standard_Integer&, 
Standard_Integer&) const':

E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx:917:20: warning: 'aWidth' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
   Standard_Integer aWidth, anAscent, aDescent;
                    ^~~~~~


http://jenkins-test-11.nnov.opencascade.com/view/WEEK-23_WEEK-23/view/OCCT%20compile/job/WEEK-23_WEEK-23-OCCT-Windows-64-Mingw-opt-compile/3/parsed_console/ [^]
Revision 2021-06-12 15:31 by kgv
Description
E:\OCCT_SRC\src\Font\Font_TextFormatter.cxx: In member function 'Standard_Boolean Font_TextFormatter::IsLFSymbol(Standard_Integer) 
const':

E:\OCCT_SRC\src\Font\Font_TextFormatter.cxx:360:14: warning: 'aBndBox.Font_Rect::Right' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
   return Abs (aBndBox.Right - aBndBox.Left) < Precision::Confusion();
          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

E:\OCCT_SRC\src\TopOpeBRep\TopOpeBRep_LineInter.cxx: In member function 'Standard_Real TopOpeBRep_LineInter::Period() 
const':

E:\OCCT_SRC\src\TopOpeBRep\TopOpeBRep_LineInter.cxx:352:16: warning: 'l' may be used uninitialized in 
this function [-Wmaybe-uninitialized]
   return (l - f);
                ^

E:\OCCT_SRC\src\TopOpeBRep\TopOpeBRep_LineInter.cxx:352:16: warning: 'f' may be used uninitialized in 
this function

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx: In member function 'void TopOpeBRepDS_BuildTool::UpdateEdgeCurveTol(const 
TopoDS_Face&, const TopoDS_Face&, TopoDS_Edge&, const opencascade::handle<Geom_Curve>&, 
Standard_Real, Standard_Real, Standard_Real, Standard_Real&, Standard_Real&, Standard_Real&) 
const':

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx:480:17: warning: 'parmax' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
       newparmax = parmax;
       ~~~~~~~~~~^~~~~~~~

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx:479:17: warning: 'parmin' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
       newparmin = parmin;
       ~~~~~~~~~~^~~~~~~~
[ 50%] Building CXX object src/TKStd/CMakeFiles/TKStd.dir/__/ShapePersistent/ShapePersistent_BRep.cxx.obj

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx: In member function 'void TopOpeBRepDS_BuildTool::ApproxCurves(const 
TopOpeBRepDS_Curve&, TopoDS_Edge&, Standard_Integer&, const opencascade::handle<TopOpeBRepDS_HDataStructure>&) 
const':

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx:567:15: warning: 'parmax' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
     newparmax = parmax;
     ~~~~~~~~~~^~~~~~~~

E:\OCCT_SRC\src\TopOpeBRepDS\TopOpeBRepDS_BuildTool.cxx:566:15: warning: 'parmin' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
     newparmin = parmin;
     ~~~~~~~~~~^~~~~~~~
     
E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx: In member function 'Standard_Integer AIS_ColorScale::computeMaxLabelWidth(const 
TColStd_SequenceOfExtendedString&) const':

E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx:917:20: warning: 'aWidth' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
   Standard_Integer aWidth, anAscent, aDescent;
                    ^~~~~~
E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx: In member function 'Standard_Integer AIS_ColorScale::TextWidth(const 
TCollection_ExtendedString&) const':

E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx:919:10: warning: 'aWidth' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
   return aWidth;
          ^~~~~~
E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx: In member function 'Standard_Integer AIS_ColorScale::TextHeight(const 
TCollection_ExtendedString&) const':

E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx:930:21: warning: 'aDescent' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
   return anAscent + aDescent;
                     ^~~~~~~~

E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx:930:21: warning: 'anAscent' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx: In member function 'void AIS_ColorScale::SizeHint(Standard_Integer&, 
Standard_Integer&) const':

E:\OCCT_SRC\src\AIS\AIS_ColorScale.cxx:917:20: warning: 'aWidth' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
   Standard_Integer aWidth, anAscent, aDescent;
                    ^~~~~~


http://jenkins-test-11.nnov.opencascade.com/view/WEEK-23_WEEK-23/view/OCCT%20compile/job/WEEK-23_WEEK-23-OCCT-Windows-64-Mingw-opt-compile/3/parsed_console/ [^]


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker