View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026783 | Open CASCADE | OCCT:Coding | public | 2015-10-16 10:49 | 2016-04-20 15:51 |
Reporter | kgv | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Debian 6.0 | ||
Product Version | 6.9.1 | ||||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0026783: Coding rules - eliminate GCC warning -Wunused-but-set-parameter | ||||
Description | gcc 4.9.2 generates the following warnings with -Wextra option which should be fixed:/occt/src/TopOpeBRep/TopOpeBRep_vprdeg.cxx|970|warning: parameter ‘hasOOEi’ set but not used [-Wunused-but-set-parameter]| /occt/src/TestTopOpeDraw/TestTopOpeDraw_Displayer.hxx|54|warning: parameter ‘Tol’ set but not used [-Wunused-but-set-parameter]| /occt/src/TestTopOpeDraw/TestTopOpeDraw_Displayer.hxx|58|warning: parameter ‘Par’ set but not used [-Wunused-but-set-parameter]| | ||||
Steps To Reproduce | N/A | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
related to | 0026854 | closed | Open CASCADE | Use -Wextra with GCC |
|
Branch CR26783 has been created by rkv. SHA-1: 0ed1895ae904c2bcb622f336faa53bc3a212cd43 Detailed log of new commits: Author: rkv Date: Tue Oct 27 10:44:12 2015 +0300 26783: Coding rules - eliminate GCC warning -Wunused-but-set-parameter Pass parameters by reference to be able to change/return their values. |
|
Branch CR26783 has been updated forcibly by kgv. SHA-1: fe6501fca6e6598857873fda4d289d593bd71fe4 |
|
Please test the patch. |
|
Dear BugMaster, Branch CR26783 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: fe6501fca6e6598857873fda4d289d593bd71fe4 Number of compiler warnings: occt component : Linux: 1 (1 on master) Windows: 0 (0 on master) products component : Linux: 39 (39 on master) Windows: 0 (0 on master) Regressions/Differences/Improvements: http://occt-tests/CR26783-master-occt-64/Debian70-64/bugs/fclasses/bug23237.html http://occt-tests/CR26783-master-occt-64/Windows-64-VC10/bugs/fclasses/bug23237.html bugs fclasses bug23237: FAILED Testing cases: Not needed Testing on Linux: occt component : Total MEMORY difference: 92604178 / 92333587 [+0.29%] Total CPU difference: 19741.309999999703 / 19729.38999999969 [+0.06%] products component : Total MEMORY difference: 26215978 / 26272952 [-0.22%] Total CPU difference: 7541.049999999976 / 7371.560000000013 [+2.30%] Testing on Windows: occt component : Total MEMORY difference: 58410402 / 58044644 [+0.63%] Total CPU difference: 18440.176205498705 / 18131.590627399022 [+1.70%] products component : Total MEMORY difference: 17260148 / 17167510 [+0.54%] Total CPU difference: 5674.005971599975 / 5658.655473199974 [+0.27%] There are no differences in images found by testdiff. |
|
Dear rkv, Branch CR26783 has been rejected due to: - regressions/differences/improvements |
|
Branch CR26783 has been updated by rkv. SHA-1: 44545c167f9a80a7f8e79d727239b3b2f5be8a08 Detailed log of new commits: Author: rkv Date: Thu Oct 29 10:41:22 2015 +0300 Merge branch 'CR26783' of git.dev.opencascade.org:occt into CR26783 Author: rkv Date: Thu Oct 29 10:40:38 2015 +0300 0026783: Coding rules - eliminate GCC warning -Wunused-but-set-parameter Unreachable code is commented. Author: rkv Date: Tue Oct 27 10:44:12 2015 +0300 26783: Coding rules - eliminate GCC warning -Wunused-but-set-parameter Pass parameters by reference to be able to change/return their values. |
|
Branch CR26783 has been deleted by rkv. SHA-1: 44545c167f9a80a7f8e79d727239b3b2f5be8a08 |
|
Branch CR26783 has been created by rkv. SHA-1: 735a48f2d8e8d7dd1425c9b60a74638d641e713a Detailed log of new commits: Author: rkv Date: Thu Oct 29 10:52:52 2015 +0300 0026783: Coding rules - eliminate GCC warning -Wunused-but-set-parameter Parameters are turned to prarmeters by reference. Unreachable code is commented. |
|
Dear Mikhail,- if (hasOOEi) { - Handle(TopOpeBRepDS_Interference) EVI1i = ::MakeEPVInterference(T1ondg,iOOEi,PVIndex,par1ondg, - TopOpeBRepDS_VERTEX,TopOpeBRepDS_EDGE,isvertex1); - myHDS->StoreInterference(EVI1i,dgEd); - } + //if (hasOOEi) { + // Handle(TopOpeBRepDS_Interference) EVI1i = ::MakeEPVInterference(T1ondg,iOOEi,PVIndex,par1ondg, + // TopOpeBRepDS_VERTEX,TopOpeBRepDS_EDGE,isvertex1); + // myHDS->StoreInterference(EVI1i,dgEd); + //} could you please confirm or reject removing these code paths? |
|
I agree with these changes. This code is a part of old Booleans, we should not spend much time to make it better, so just elimination of warning is enough. |
|
OK, then commented code should be removed within the patch. |
|
Branch CR26783_1 has been created by kgv. SHA-1: 7a86234b173a5ba5171a5797b037fb8dd05047b5 Detailed log of new commits: Author: rkv Date: Thu Nov 5 16:07:37 2015 +0300 0026783: Coding rules - eliminate GCC warning -Wunused-but-set-parameter TestTopOpeDraw_Displayer::GetTol(), GetPar() - pass assigned parameters by reference. TopOpeBRep_FacesFiller::ProcessVPondgE() - remove unreachable code. |
|
Please test updated patch in branch CR26783_1. |
|
I would not remove the old code, because in such way we make distortion in the initial idea of the code. All this code should be removed, and it will be removed some time. I don't see any sense of removing the commented out code. May be it is better to insert there an explanation of making it commented. |
|
> May be it is better to insert there an explanation of making it commented. this is explained by commit description and kept for history within git. So usually there no need to keep bloated code in file itself. |
|
Branch CR26783 has been updated forcibly by mkv. SHA-1: c62ba57e8a4fc6dabb435062cae67a1b2030a5ac |
|
> Branch CR26783 has been updated forcibly by mkv. what for this branch has been rebased? |
|
I agree with Mikhail: it is better to keep inactive code commented, as it will make it easier to see how offending variable (hasOOEi) was intended to be used, while looking at the code (without digging in Git history). Alternatively, we shall remove hasOOEi completely, also from FUN_putInterfonDegenEd(), but we seem to have no real interest in tracing all this now... On the other side, I find it reasonable to remove ~650 commented lines of code at the beginning of that file -- this code seems to contain alternative implementation of the same stuff, never used. |
|
Branch CR26783_2 has been created by abv. SHA-1: 7375a13a8033d0129f30b24c73351103940e9cc5 Detailed log of new commits: Author: rkv Date: Thu Nov 5 16:07:37 2015 +0300 0026783: Coding rules - eliminate GCC warning -Wunused-but-set-parameter TestTopOpeDraw_Displayer::GetTol(), GetPar() - pass assigned parameters by reference. TopOpeBRep_vprdeg.cxx, TopOpeBRep_FacesFiller::ProcessVPondgE() - remove commented code, comment inactive code. |
|
Dear BugMaster, Branch CR26783_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms on Release mode. SHA-1: 7375a13a8033d0129f30b24c73351103940e9cc5 There are following compilation errors: Linux: http://jenkins-test-01.nnov.opencascade.com:8080/view/CR26783-2-master/job/CR26783-2-master_build_occt_linux/1/parsed_console/ ../../../../src/RWStepDimTol/RWStepDimTol_RWNonUniformZoneDefinition.cxx:21:45: fatal error: StepRepr_HArray1OfShapeAspect.hxx: No such file or directory Windows: http://jenkins-test-01.nnov.opencascade.com:8080/view/CR26783-2-master/job/CR26783-2-master_build_occt_windows_64/1/parsed_console/ d:\builds\vc10\CR26783-2-master-occt-64\inc\StepDimTol_ToleranceZoneDefinition.hxx(24): fatal error C1083: Cannot open include file: 'StepRepr_HArray1OfShapeAspect.hxx': No such file or directory d:\builds\vc10\CR26783-2-master-occt-64\inc\StepDimTol_ToleranceZoneDefinition.hxx(24): fatal error C1083: Cannot open include file: 'StepRepr_HArray1OfShapeAspect.hxx': No such file or directory d:\builds\vc10\CR26783-2-master-occt-64\inc\StepDimTol_ToleranceZoneDefinition.hxx(24): fatal error C1083: Cannot open include file: 'StepRepr_HArray1OfShapeAspect.hxx': No such file or directory d:\builds\vc10\CR26783-2-master-occt-64\inc\StepDimTol_ToleranceZoneDefinition.hxx(24): fatal error C1083: Cannot open include file: 'StepRepr_HArray1OfShapeAspect.hxx': No such file or directory ..\..\..\src\RWStepDimTol\RWStepDimTol_RWNonUniformZoneDefinition.cxx(21): fatal error C1083: Cannot open include file: 'StepRepr_HArray1OfShapeAspect.hxx': No such file or directory ..\..\..\src\RWStepDimTol\RWStepDimTol_RWProjectedZoneDefinition.cxx(22): fatal error C1083: Cannot open include file: 'StepRepr_HArray1OfShapeAspect.hxx': No such file or directory ..\..\..\src\RWStepDimTol\RWStepDimTol_RWRunoutZoneDefinition.cxx(21): fatal error C1083: Cannot open include file: 'StepRepr_HArray1OfShapeAspect.hxx': No such file or directory ..\..\..\src\RWStepDimTol\RWStepDimTol_RWToleranceZoneDefinition.cxx(21): fatal error C1083: Cannot open include file: 'StepRepr_HArray1OfShapeAspect.hxx': No such file or directory |
|
The problem was due to lost hxx files in StepRepr/FILES in fix for 0026850 on which branch CR26783 is based; now corrected |
|
Branch CR26783 has been deleted by kgv. SHA-1: c62ba57e8a4fc6dabb435062cae67a1b2030a5ac |
|
Branch CR26783_1 has been deleted by kgv. SHA-1: 7a86234b173a5ba5171a5797b037fb8dd05047b5 |
|
Branch CR26783_2 has been deleted by kgv. SHA-1: 7375a13a8033d0129f30b24c73351103940e9cc5 |
occt: master 3d18f1e0 2015-11-05 13:07:37
Committer: abv Details Diff |
0026783: Coding rules - eliminate GCC warning -Wunused-but-set-parameter TestTopOpeDraw_Displayer::GetTol(), GetPar() - pass assigned parameters by reference. TopOpeBRep_vprdeg.cxx, TopOpeBRep_FacesFiller::ProcessVPondgE() - remove commented code, comment inactive code. |
Affected Issues 0026783 |
|
mod - src/TestTopOpeDraw/TestTopOpeDraw_Displayer.hxx | Diff File | ||
mod - src/TopOpeBRep/TopOpeBRep_vprdeg.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-10-16 10:49 | kgv | New Issue | |
2015-10-16 10:49 | kgv | Assigned To | => kgv |
2015-10-16 10:49 | kgv | Assigned To | kgv => rkv |
2015-10-16 10:49 | kgv | Status | new => assigned |
2015-10-27 10:44 | git | Note Added: 0047464 | |
2015-10-27 10:44 |
|
Assigned To | rkv => kgv |
2015-10-27 10:44 |
|
Status | assigned => resolved |
2015-10-27 11:02 | git | Note Added: 0047465 | |
2015-10-27 11:03 | kgv | Note Added: 0047466 | |
2015-10-27 11:03 | kgv | Assigned To | kgv => bugmaster |
2015-10-27 11:03 | kgv | Status | resolved => reviewed |
2015-10-27 13:52 |
|
Assigned To | bugmaster => mkv |
2015-10-28 15:19 |
|
Note Added: 0047538 | |
2015-10-28 15:20 |
|
Note Added: 0047539 | |
2015-10-28 15:20 |
|
Assigned To | mkv => rkv |
2015-10-28 15:20 |
|
Status | reviewed => assigned |
2015-10-28 15:20 |
|
Test case number | => Not needed |
2015-10-29 10:41 | git | Note Added: 0047574 | |
2015-10-29 10:48 | git | Note Added: 0047578 | |
2015-10-29 10:55 | git | Note Added: 0047580 | |
2015-10-29 10:56 |
|
Assigned To | rkv => kgv |
2015-10-29 10:56 |
|
Status | assigned => resolved |
2015-11-05 12:19 | kgv | Note Added: 0047803 | |
2015-11-05 12:19 | kgv | Assigned To | kgv => msv |
2015-11-05 12:19 | kgv | Status | resolved => feedback |
2015-11-05 16:00 |
|
Note Added: 0047832 | |
2015-11-05 16:00 |
|
Assigned To | msv => bugmaster |
2015-11-05 16:00 |
|
Status | feedback => reviewed |
2015-11-05 16:02 | kgv | Note Added: 0047833 | |
2015-11-05 16:09 | git | Note Added: 0047835 | |
2015-11-05 16:09 | kgv | Note Added: 0047836 | |
2015-11-05 16:10 |
|
Note Added: 0047837 | |
2015-11-05 16:15 | kgv | Note Added: 0047838 | |
2015-11-05 16:16 |
|
Assigned To | bugmaster => mkv |
2015-11-05 16:39 | git | Note Added: 0047843 | |
2015-11-05 19:27 | kgv | Note Added: 0047848 | |
2015-11-08 19:15 |
|
Note Added: 0047922 | |
2015-11-08 19:16 | git | Note Added: 0047923 | |
2015-11-09 07:49 |
|
Relationship added | related to 0026854 |
2015-11-09 14:35 |
|
Note Added: 0047952 | |
2015-11-09 14:35 |
|
Assigned To | mkv => abv |
2015-11-09 14:35 |
|
Status | reviewed => assigned |
2015-11-09 15:59 |
|
Note Added: 0047957 | |
2015-11-09 15:59 |
|
Assigned To | abv => kgv |
2015-11-09 15:59 |
|
Status | assigned => resolved |
2015-11-09 16:48 |
|
Assigned To | kgv => bugmaster |
2015-11-09 16:48 |
|
Status | resolved => reviewed |
2015-11-09 17:04 |
|
Assigned To | bugmaster => mkv |
2015-11-13 11:53 |
|
Changeset attached | => occt master 3d18f1e0 |
2015-11-13 11:53 |
|
Assigned To | mkv => abv |
2015-11-13 11:53 |
|
Status | reviewed => verified |
2015-11-13 11:53 |
|
Resolution | open => fixed |
2016-04-17 14:23 | git | Note Added: 0053151 | |
2016-04-17 14:23 | git | Note Added: 0053152 | |
2016-04-17 14:23 | git | Note Added: 0053153 | |
2016-04-20 15:42 |
|
Fixed in Version | => 7.0.0 |
2016-04-20 15:51 |
|
Status | verified => closed |