MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029927Open CASCADE[OCCT] OCCT:Codingpublic2018-07-04 10:462018-10-08 12:16
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformLinuxOSUbuntu 18.04OS Version64 bit
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0029927: Coding Rules - eliminate GCC compiler warnings -Wmaybe-uninitialized in BRepApprox
DescriptionThe following GCC 7.3.0 compiler warnings should be eliminated:
                 from /occt/src/BRepApprox/BRepApprox_Approx_0.cxx:17:
/occt/inc/../src/gp/gp_Pnt.lxx: In member function ‘void BRepApprox_Approx::fillData(const opencascade::handle<BRepApprox_ApproxLine>&)’:

/occt/inc/../src/gp/gp_Pnt.lxx:64:18: warning: ‘<anonymous>’ may be used uninitialized in this 
function [-Wmaybe-uninitialized]
 { return coord.X(); }
                  ^
/occt/inc/../src/gp/gp_Pnt.lxx:67:18: warning: ‘*((void*)&<anonymous> +8)’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 { return coord.Y(); }
g++ -mmmx -msse -msse2 -mfpmath=sse -std=c++0x -fPIC -DOCC_CONVERT_SIGNALS -Wall -fexceptions -DHAVE_FREEIMAGE 
-DHAVE_FFMPEG -I/usr/include/tcl8.6 -I/usr/include/freetype2 -I/occt/inc -O2 -DNDEBUG -DNo_Exception 
-I../../../inc -c /occt/src/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox_0.cxx 
-o ../../../lin/cbp/obj/src/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox_0.o
                  
^
/occt/inc/../src/gp/gp_Pnt.lxx:70:18: warning: ‘*((void*)&<anonymous> +16)’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 { return coord.Z(); }
...

                 from /occt/src/BRepApprox/BRepApprox_TheMultiLineOfApprox_0.cxx:17:
/occt/inc/../src/gp/gp_Pnt.lxx: In member function ‘void BRepApprox_TheMultiLineOfApprox::Value(Standard_Integer, 
TColgp_Array1OfPnt&) const’:
/occt/inc/../src/gp/gp_Pnt.lxx:70:18: warning: ‘*((void*)&<anonymous> +16)’ is used uninitialized 
in this function [-Wuninitialized]
 { return coord.Z(); }
                  ^
/occt/inc/../src/gp/gp_Pnt.lxx:67:18: warning: ‘*((void*)&<anonymous> +8)’ is used uninitialized 
in this function [-Wuninitialized]
 { return coord.Y(); }
                  ^
/occt/inc/../src/gp/gp_Pnt.lxx:64:18: warning: ‘<anonymous>’ is used uninitialized in this 
function [-Wuninitialized]
 { return coord.X(); }
                  ^
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0030207verifiedapn Community ChFi3d_KParticular stack-use-after-scope 

-  Notes
(0077255)
git (administrator)
2018-07-04 10:50

Branch CR29927 has been created by kgv.

SHA-1: 030ed8301d30c5cf8eb0e3ca42e5c1eabd3cd70f


Detailed log of new commits:

Author: kgv
Date: Wed Jul 4 10:49:44 2018 +0300

    0029927: Coding Rules - eliminate GCC compiler warnings -Wmaybe-uninitialized in BRepApprox
    
    Fixed taking a reference from a field of a temporary variable
    (BRepApprox_ApproxLine::Point() returns non-reference structure).
(0077259)
kgv (developer)
2018-07-04 12:16

Patch is ready for review.

http://jenkins-test-11.nnov.opencascade.com/view/CR29927-master-KGV/ [^]
(0077264)
abv (manager)
2018-07-04 13:46

No remarks, please integrate
(0077277)
bugmaster (administrator)
2018-07-04 21:06

Combination -
OCCT branch : CR29927 SHA - 030ed8301d30c5cf8eb0e3ca42e5c1eabd3cd70f
Products branch : master SHA - 8ff715ac468ec83b3308d4e7f390b228b95c965a
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:
Debian70-64:
OCCT
Total CPU difference: 17120.719999999914 / 17168.50999999987 [-0.28%]
Products
Total CPU difference: 7457.720000000031 / 7526.93000000002 [-0.92%]
Windows-64-VC10:
OCCT
Total CPU difference: 16885.064636898547 / 16935.000556998602 [-0.29%]
Products
Total CPU difference: 8230.877961699889 / 8215.262261599859 [+0.19%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0077354)
git (administrator)
2018-07-08 12:00

Branch CR29927 has been deleted by inv.

SHA-1: 030ed8301d30c5cf8eb0e3ca42e5c1eabd3cd70f

- Related Changesets
occt: master b053e5d6
Timestamp: 2018-07-04 07:49:44
Author: kgv
Committer: bugmaster
Details ] Diff ]
0029927: Coding Rules - eliminate GCC compiler warnings -Wmaybe-uninitialized in BRepApprox

The code has been fixed to avoid taking a reference from a field of a temporary variable
(BRepApprox_ApproxLine::Point() returns non-reference structure).
mod - src/ApproxInt/ApproxInt_Approx.gxx Diff ] File ]
mod - src/ApproxInt/ApproxInt_MultiLine.gxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2018-07-04 10:46 kgv New Issue
2018-07-04 10:46 kgv Assigned To => kgv
2018-07-04 10:50 git Note Added: 0077255
2018-07-04 12:16 kgv Note Added: 0077259
2018-07-04 12:16 kgv Assigned To kgv => abv
2018-07-04 12:16 kgv Status new => resolved
2018-07-04 13:46 abv Note Added: 0077264
2018-07-04 13:46 abv Assigned To abv => bugmaster
2018-07-04 13:46 abv Status resolved => reviewed
2018-07-04 21:06 bugmaster Test case number => Not needed
2018-07-04 21:06 bugmaster Note Added: 0077277
2018-07-04 21:06 bugmaster Status reviewed => tested
2018-07-08 11:37 bugmaster Changeset attached => occt master b053e5d6
2018-07-08 11:37 bugmaster Status tested => verified
2018-07-08 11:37 bugmaster Resolution open => fixed
2018-07-08 12:00 git Note Added: 0077354
2018-10-08 12:16 kgv Relationship added related to 0030207


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker