View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029927 | Open CASCADE | OCCT:Coding | public | 2018-07-04 10:46 | 2018-10-08 12:16 |
Reporter | kgv | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu 18.04 | ||
Product Version | 7.3.0 | ||||
Target Version | 7.4.0 | Fixed in Version | 7.4.0 | ||
Summary | 0029927: Coding Rules - eliminate GCC compiler warnings -Wmaybe-uninitialized in BRepApprox | ||||
Description | The 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 Reproduce | N/A | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
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). |
|
Patch is ready for review. http://jenkins-test-11.nnov.opencascade.com/view/CR29927-master-KGV/ |
|
No remarks, please integrate |
|
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 |
|
Branch CR29927 has been deleted by inv. SHA-1: 030ed8301d30c5cf8eb0e3ca42e5c1eabd3cd70f |
occt: master b053e5d6 2018-07-04 07:49:44 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). |
Affected Issues 0029927 |
|
mod - src/ApproxInt/ApproxInt_Approx.gxx | Diff File | ||
mod - src/ApproxInt/ApproxInt_MultiLine.gxx | Diff File |
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 |
|
Note Added: 0077264 | |
2018-07-04 13:46 |
|
Assigned To | abv => bugmaster |
2018-07-04 13:46 |
|
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 |