Archived issue #0031671
Coding Rules - eliminate warnings issued by clang 11
Description
clang 11 compiler from Emscripten 1.39 generates new warning:
In file included from /occt.git/wasm-make/inc\NCollection_BaseList.hxx:1:
/occt.git/src/NCollection/NCollection_BaseList.hxx:70:15: warning: definition of implicit copy constructor for 'Iterator' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
Iterator& operator= (const Iterator& theIt)
^
/occt.git/src/NCollection/NCollection_TListIterator.hxx:27:36: note: in implicit copy constructor for 'NCollection_BaseList::Iterator' first required here
template <class TheItemType> class NCollection_TListIterator
^
/occt.git/src/V3d/V3d_Viewer.hxx:244:62: note: in implicit move constructor for 'NCollection_TListIterator<opencascade::handle<V3d_View>>' first required here
V3d_ListOfViewIterator ActiveViewIterator() const { return V3d_ListOfViewIterator (myActiveViews); }
^
/occt.git\src\LDOM\LDOM_CharReference.cxx:38:8: warning: definition of implicit copy constructor for 'entityRef' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
void operator= (const entityRef&);
^
/occt.git\src\LDOM\LDOM_CharReference.cxx:139:5: note: in implicit copy constructor for 'entityRef' first required here
entityRef(NULL, 0),
^
1 warning generated.
/occt.git\src\ShapeAnalysis\ShapeAnalysis_Geom.cxx:140:5: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
gp_XYZ v1 ( gtrsf.Value(1,1), gtrsf.Value(2,1), gtrsf.Value(3,1) );
^
/occt.git\src\ShapeAnalysis\ShapeAnalysis_Geom.cxx:130:3: note: previous statement is here
for (Standard_Integer i = 1; i <= 3; i ++)
^
1 warning generated.
/occt.git\src\CSLib\CSLib.cxx:540:5: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
return DerVecNor.Value(Nu,Nv);
^
/occt.git\src\CSLib\CSLib.cxx:455:1: note: previous statement is here
for ( Mderiv = 1;Mderiv <= Kderiv; Mderiv++)
^
1 warning generated.
/occt.git\src\SelectMgr\SelectMgr_ViewerSelector.cxx:55:10: warning: definition of implicit copy constructor for 'CompareResults' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
void operator = (const CompareResults&);
^
/occt.git\src\SelectMgr\SelectMgr_ViewerSelector.cxx:910:56: note: in implicit copy constructor for '(anonymous namespace)::CompareResults' first required here
std::sort (anIndexArray.begin(), anIndexArray.end(), CompareResults (mystored));
^
1 warning generated.
/occt.git\src\AppDef\AppDef_LinearCriteria.cxx:366:5: warning: misleading indentation; statement is not part of the previous 'for' [-Wmisleading-indentation]
if (ValCri[0] > myEstimation[0] * 2) {
^
/occt.git\src\AppDef\AppDef_LinearCriteria.cxx:355:3: note: previous statement is here
for(i = 0; i <= 2; i++)
^
1 warning generated.
/occt.git\src\MoniTool\MoniTool_TypedValue.cxx:449:5: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
theeadds.Bind (val,num);
^
/occt.git\src\MoniTool\MoniTool_TypedValue.cxx:445:3: note: previous statement is here
if (theenums->Value(num).Length() == 0)
^
...
clang++ --version
clang version 11.0.0 (Cswircachegitchromium.googlesource.com-external-github.com-llvm-llvm--project [revision removed])
Target: x86_64-pc-windows-msvc
Thread model: posix
Steps to reproduce
N/A
Public activity
9 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Jul 17 15:12:49 2020 +0300
0031671: Coding Rules - eliminate warnings issued by clang 11
Fixed -Wdeprecated-copy warning by removing trivial operator=.
Fixed formatting issues in places producing -Wmisleading-indentation warning.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Jul 17 15:12:49 2020 +0300
0031671: Coding Rules - eliminate warnings issued by clang 11
Fixed -Wdeprecated-copy warning by removing trivial operator=.
Fixed formatting issues in places producing -Wmisleading-indentation warning.
Patch is ready for review in OCCT branch CR31671.
http://jenkins-test-12.nnov.opencascade.com/view/CR31671-master-KGV/
http://jenkins-test-12.nnov.opencascade.com/view/CR31671-master-KGV/
The patch was reviewed without remarks
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Wed Jul 22 19:42:32 2020 +0300
# suppress warning on old msvc
[revision removed]
Detailed log of new commits:
Author: Author
Date: Wed Jul 22 19:42:32 2020 +0300
# suppress warning on old msvc
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Jul 17 15:12:49 2020 +0300
0031671: Coding Rules - eliminate warnings issued by clang 11
Fixed -Wdeprecated-copy warning by removing trivial operator=.
Fixed formatting issues in places producing -Wmisleading-indentation warning.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Fri Jul 17 15:12:49 2020 +0300
0031671: Coding Rules - eliminate warnings issued by clang 11
Fixed -Wdeprecated-copy warning by removing trivial operator=.
Fixed formatting issues in places producing -Wmisleading-indentation warning.
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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: 17271.39000000011 / 17230.04000000007 [+0.24%]
Products
Total CPU difference: 800.6699999999917 / 791.7399999999936 [+1.13%]
Windows-64-VC14:
OCCT
Total CPU difference: 18742.140625 / 18745.390625 [-0.02%]
Products
Total CPU difference: 1329.234375 / 1321.390625 [+0.59%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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: 17271.39000000011 / 17230.04000000007 [+0.24%]
Products
Total CPU difference: 800.6699999999917 / 791.7399999999936 [+1.13%]
Windows-64-VC14:
OCCT
Total CPU difference: 18742.140625 / 18745.390625 [-0.02%]
Products
Total CPU difference: 1329.234375 / 1321.390625 [+0.59%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records