MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032341Open CASCADE[OCCT] OCCT:Codingpublic2021-04-29 21:002021-05-01 13:32
Reporterkgv 
Assigned Tokgv 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformLinuxOSUbuntuOS Version21.04
Product Version[OCCT] 7.5.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0032341: Coding Rules - eliminate GCC11 compiler warnings -Wmaybe-uninitialized
DescriptionGCC11 generates 24 new warnings -Wmaybe-uninitialized like
../../../../src/BSplCLib/BSplCLib.cxx: In static member function ‘static void BSplCLib::Trimming(Standard_Integer, 
Standard_Boolean, Standard_Integer, const TColStd_Array1OfReal&, const TColStd_Array1OfInteger&, 
const TColStd_Array1OfReal&, Standard_Real, Standard_Real, TColStd_Array1OfReal&, TColStd_Array1OfInteger&, 
TColStd_Array1OfReal&)’:
../../../../src/BSplCLib/BSplCLib.cxx:2819:42: warning: ‘kk’ may be used uninitialized [-Wmaybe-uninitialized]
 
2819 |   TColStd_Array1OfReal    K( kk[0], 1, 2 );
      |                                          ^
In file included from ../../../../inc/NCollection_Array1.hxx:1,
                 from ../../../../inc/../src/TColStd/TColStd_Array1OfReal.hxx:19,
                 from ../../../../inc/TColStd_Array1OfReal.hxx:1,
                 from ../../../../inc/../src/BSplCLib/BSplCLib.hxx:24,
                 from ../../../../inc/BSplCLib.hxx:1,
                 from ../../../../src/BSplCLib/BSplCLib.cxx:30:
../../../../inc/../src/NCollection/NCollection_Array1.hxx:206:3: note: by argument 2 of type ‘const 
double&’ to ‘NCollection_Array1<TheItemType>::NCollection_Array1(const TheItemType&, 
Standard_Integer, Standard_Integer) [with TheItemType = double]’ declared here
  206 |   NCollection_Array1 (const TheItemType& theBegin,
      |   ^~~~~~~~~~~~~~~~~~
../../../../src/BSplCLib/BSplCLib.cxx:2817:17: note: ‘kk’ declared here
 2817 |   Standard_Real kk[2];
      |                 ^~

../../../../src/Geom/Geom_BezierSurface.cxx:1394:50: warning: ‘array_u’ may be used uninitialized 
[-Wmaybe-uninitialized]
 1394 |   TColStd_Array1OfReal biduknots(array_u[0], 1, 2); biduknots(1) = 0.; biduknots(2) = 1.;
      |                                                  ^
In file included from ../../../../inc/NCollection_Array1.hxx:1,
                 from ../../../../inc/../src/TColStd/TColStd_Array1OfReal.hxx:19,
                 from ../../../../inc/TColStd_Array1OfReal.hxx:1,
                 from ../../../../inc/../src/BSplCLib/BSplCLib.hxx:24,
                 from ../../../../inc/BSplCLib.hxx:1,
                 from ../../../../src/Geom/Geom_BezierSurface.cxx:30:
../../../../inc/../src/NCollection/NCollection_Array1.hxx:206:3: note: by argument 2 of type ‘const 
double&’ to ‘NCollection_Array1<TheItemType>::NCollection_Array1(const TheItemType&, 
Standard_Integer, Standard_Integer) [with TheItemType = double]’ declared here
  206 |   NCollection_Array1 (const TheItemType& theBegin,
      |   ^~~~~~~~~~~~~~~~~~
../../../../src/Geom/Geom_BezierSurface.cxx:1390:17: note: ‘array_u’ declared here
 1390 |   Standard_Real array_u[2];
      |                 ^~~~~~~
../../../../src/Geom/Geom_BezierSurface.cxx: In member function ‘virtual void Geom_BezierSurface::D1(Standard_Real, 
Standard_Real, gp_Pnt&, gp_Vec&, gp_Vec&) const’:
../../../../src/Geom/Geom_BezierSurface.cxx:1433:50: warning: ‘array_u’ may be used uninitialized 
[-Wmaybe-uninitialized]
 1433 |   TColStd_Array1OfReal biduknots(array_u[0], 1, 2); biduknots(1) = 0.; biduknots(2) = 1.;
      |                                                  ^
In file included from ../../../../inc/NCollection_Array1.hxx:1,
                 from ../../../../inc/../src/TColStd/TColStd_Array1OfReal.hxx:19,
                 from ../../../../inc/TColStd_Array1OfReal.hxx:1,
                 from ../../../../inc/../src/BSplCLib/BSplCLib.hxx:24,
                 from ../../../../inc/BSplCLib.hxx:1,
                 from ../../../../src/Geom/Geom_BezierSurface.cxx:30:
../../../../inc/../src/NCollection/NCollection_Array1.hxx:206:3: note: by argument 2 of type ‘const 
double&’ to ‘NCollection_Array1<TheItemType>::NCollection_Array1(const TheItemType&, 
Standard_Integer, Standard_Integer) [with TheItemType = double]’ declared here
  206 |   NCollection_Array1 (const TheItemType& theBegin,
      |   ^~~~~~~~~~~~~~~~~~
../../../../src/Geom/Geom_BezierSurface.cxx:1429:17: note: ‘array_u’ declared here
 1429 |   Standard_Real array_u[2];
      |                 ^~~~~~~
../../../../src/Geom/Geom_BezierSurface.cxx: In member function ‘virtual void Geom_BezierSurface::D2(Standard_Real, 
Standard_Real, gp_Pnt&, gp_Vec&, gp_Vec&, gp_Vec&, gp_Vec&, gp_Vec&) const’:

../../../../src/Geom/Geom_BezierSurface.cxx:1471:50: warning: ‘array_u’ may be used uninitialized 
[-Wmaybe-uninitialized]
 1471 |   TColStd_Array1OfReal biduknots(array_u[0], 1, 2); biduknots(1) = 0.; biduknots(2) = 1.;
      |                                                  ^
In file included from ../../../../inc/NCollection_Array1.hxx:1,
                 from ../../../../inc/../src/TColStd/TColStd_Array1OfReal.hxx:19,
                 from ../../../../inc/TColStd_Array1OfReal.hxx:1,
                 from ../../../../inc/../src/BSplCLib/BSplCLib.hxx:24,
                 from ../../../../inc/BSplCLib.hxx:1,
                 from ../../../../src/Geom/Geom_BezierSurface.cxx:30:
../../../../inc/../src/NCollection/NCollection_Array1.hxx:206:3: note: by argument 2 of type ‘const 
double&’ to ‘NCollection_Array1<TheItemType>::NCollection_Array1(const TheItemType&, 
Standard_Integer, Standard_Integer) [with TheItemType = double]’ declared here
  206 |   NCollection_Array1 (const TheItemType& theBegin,
      |   ^~~~~~~~~~~~~~~~~~
../../../../src/Geom/Geom_BezierSurface.cxx:1467:17: note: ‘array_u’ declared here
 1467 |   Standard_Real array_u[2];
      |                 ^~~~~~~

../../../../src/AdvApp2Var/AdvApp2Var_SysBase.cxx: In function ‘int matrsym_(const char*, const char*, 
integer*, integer*, ftnlen, ftnlen)’:
../../../../src/AdvApp2Var/AdvApp2Var_SysBase.cxx:1918:11: warning: ‘chainx’ may be used uninitialized 
[-Wmaybe-uninitialized]
 1918 |   magtlog_(cnmsym, chainx, length, iercod, cnmsym_len, 255L);
      |   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../src/AdvApp2Var/AdvApp2Var_SysBase.cxx:1160:5: note: by argument 2 of type ‘const char*’ 
to ‘int magtlog_(const char*, const char*, integer*, integer*, ftnlen, ftnlen)’ declared here
 1160 | int magtlog_(const char *cnmlog,
      |     ^~~~~~~~
../../../../src/AdvApp2Var/AdvApp2Var_SysBase.cxx:1870:8: note: ‘chainx’ declared here
 1870 |   char chainx[255];
      |        ^~~~~~
../../../../src/AdvApp2Var/AdvApp2Var_SysBase.cxx: In function ‘int macrgfl_(intptr_t*, intptr_t*, 
integer*, integer*)’:
../../../../src/AdvApp2Var/AdvApp2Var_SysBase.cxx:823:13: warning: ‘cbid’ may be used uninitialized 
[-Wmaybe-uninitialized]
  823 |     matrsym_("NO_OVERFLOW", cbid, &novfl, &ibid, 11L, 1L);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../src/AdvApp2Var/AdvApp2Var_SysBase.cxx:1861:5: note: by argument 2 of type ‘const char*’ 
to ‘int matrsym_(const char*, const char*, integer*, integer*, ftnlen, ftnlen)’ declared here
 1861 | int matrsym_(const char *cnmsym,
      |     ^~~~~~~~
../../../../src/AdvApp2Var/AdvApp2Var_SysBase.cxx:728:8: note: ‘cbid’ declared here
  728 |   char cbid[1];
      |        ^~~~

In file included from ../../../../inc/IntImp_Int2S.gxx:1,
                 from ../../../../src/GeomInt/GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox_0.cxx:40:

../../../../inc/../src/IntImp/IntImp_Int2S.gxx: In member function ‘IntImp_ConstIsoparametric GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox::Perform(const 
TColStd_Array1OfReal&, math_FunctionSetRoot&, IntImp_ConstIsoparametric)’:
../../../../inc/../src/IntImp/IntImp_Int2S.gxx:89:40: warning: ‘BornInfBuf’ may be used uninitialized 
[-Wmaybe-uninitialized]
   89 |   math_Vector BornInf (BornInfBuf, 1, 3), BornSup (BornSupBuf, 1, 3),
      |                                        ^
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot required
Attached Files

- Relationships

-  Notes
(0100676)
git (administrator)
2021-04-29 21:00

Branch CR32341 has been created by kgv.

SHA-1: 4b49f39ae9ec6e21220a667670247353aa2708e6


Detailed log of new commits:

Author: kgv
Date: Thu Apr 29 21:01:17 2021 +0300

    0032341: Coding Rules - eliminate GCC11 compiler warnings -Wmaybe-uninitialized
(0100681)
kgv (developer)
2021-04-30 09:39

Patch is ready for review
- OCCT: branch CR32341 (rebased on a WEEK).

http://jenkins-test-occt.nnov.opencascade.com:8080/view/CR32341-master-KGV/ [^]
(0100686)
git (administrator)
2021-04-30 10:54

Branch CR32341 has been updated forcibly by kgv.

SHA-1: b04cd5d58770c45bea62f120000343b140415387
(0100687)
msv (developer)
2021-04-30 11:17

Please raise CR32341 to occt.
(0100723)
bugmaster (administrator)
2021-05-01 12:28

Combination -
OCCT branch : master
Products branch : master
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17839.600000000362 / 17844.450000000477 [-0.03%]
Products
Total CPU difference: 11562.480000000109 / 11558.800000000136 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19303.28125 / 19431.828125 [-0.66%]
Products
Total CPU difference: 12894.515625 / 12871.203125 [+0.18%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0100736)
git (administrator)
2021-05-01 13:32

Branch CR32341 has been deleted by inv.

SHA-1: b04cd5d58770c45bea62f120000343b140415387

- Related Changesets
occt: master b04cd5d5
Timestamp: 2021-04-29 18:01:17
Author: kgv
Details ] Diff ]
0032341: Coding Rules - eliminate GCC11 compiler warnings -Wmaybe-uninitialized
mod - src/AdvApp2Var/AdvApp2Var_MathBase.cxx Diff ] File ]
mod - src/AdvApp2Var/AdvApp2Var_SysBase.cxx Diff ] File ]
mod - src/BSplCLib/BSplCLib.cxx Diff ] File ]
mod - src/Geom/Geom_BezierSurface.cxx Diff ] File ]
mod - src/IGESData/IGESData_IGESReaderTool.cxx Diff ] File ]
mod - src/IntImp/IntImp_Int2S.gxx Diff ] File ]
mod - src/IntWalk/IntWalk_IWalking_3.gxx Diff ] File ]
mod - src/IntWalk/IntWalk_IWalking_4.gxx Diff ] File ]
mod - src/IntWalk/IntWalk_IWalking_6.gxx Diff ] File ]
mod - src/MeshVS/MeshVS_CommonSensitiveEntity.cxx Diff ] File ]
mod - src/QANCollection/QANCollection_Test.cxx Diff ] File ]
mod - src/StepData/StepData_StepWriter.cxx Diff ] File ]
mod - src/XSControl/XSControl_Utils.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2021-04-29 21:00 kgv New Issue
2021-04-29 21:00 kgv Assigned To => kgv
2021-04-29 21:00 git Note Added: 0100676
2021-04-29 21:10 kgv OS => Ubuntu
2021-04-29 21:10 kgv OS Version => 21.04
2021-04-29 21:10 kgv Platform => Linux
2021-04-30 09:39 kgv Note Added: 0100681
2021-04-30 09:39 kgv Assigned To kgv => msv
2021-04-30 09:39 kgv Status new => resolved
2021-04-30 10:54 git Note Added: 0100686
2021-04-30 11:17 msv Note Added: 0100687
2021-04-30 11:17 msv Assigned To msv => bugmaster
2021-04-30 11:17 msv Status resolved => reviewed
2021-05-01 12:28 bugmaster Note Added: 0100723
2021-05-01 12:28 bugmaster Status reviewed => tested
2021-05-01 12:41 bugmaster Test case number => Not required
2021-05-01 12:44 kgv Changeset attached => occt master b04cd5d5
2021-05-01 12:44 kgv Assigned To bugmaster => kgv
2021-05-01 12:44 kgv Status tested => verified
2021-05-01 12:44 kgv Resolution open => fixed
2021-05-01 13:32 git Note Added: 0100736


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker