View Issue Details

IDProjectCategoryView StatusLast Update
0024513Open CASCADEOCCT:Modeling Algorithmspublic2014-11-11 12:52
ReporterabvAssigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.7.0 
Target Version6.8.0Fixed in Version6.8.0 
Summary0024513: Suspicious code highlighted by #24510
DescriptionSome fixes of compiler warning on unused variable made for 0024510 highlight suspicious pieces in the code which need to be analyzed more in-depth:

Blend_Walking_1.gxx, Blend_Walking::PerformFirstSection(): value returned by TestArret() is not used

Bnd_BoundSortBox.cxx, Bnd_BoundSortBox::Compare(): min and max values of bounding box limits used in comparison come from different sources

IntTools_EdgeFace.cxx, IntTools_EdgeFace::FindProjectableRoot(): argument ff2 is not used, function is not symmetric in respect to ff1 and ff2

ProjLib_ProjectedCurve.cxx, ProjLib_ProjectedCurve::Load(): treatment of surface of revolution is not symmetric in respect to min and max V range, v1 is not used
TagsNo tags attached.
Test case numberNot needed

Relationships

child of 0024510 closedbugmaster Community Remove unused local variables 

Activities

abv

2014-01-03 12:24

manager   ~0027380

The branch containing straightforward fixes for compiler warnings on unused variables (made for 0024510) pushed to CR24513

aml

2014-04-15 08:19

developer   ~0028832

Dear ifv,
Please check current state of branch CR24513.

I
Blend_Walking_1.gxx, Blend_Walking::PerformFirstSection(): value returned by TestArret() is not used
Fixed. Added usage of returned value. Refactoring.

II
Bnd_BoundSortBox.cxx, Bnd_BoundSortBox::Compare(): min and max values of bounding box limits used in comparison come from different sources
Deleted some obsolete code, now used only one source. Refactoring.

III
IntTools_EdgeFace.cxx, IntTools_EdgeFace::FindProjectableRoot(): argument ff2 is not used, function is not symmetric in respect to ff1 and ff2
This function not symetric because ff2 = !ff1, ff1 and ff2 not integer, but boolean values. That's why ff2 is redundant and not used. Refactoring.

IV
ProjLib_ProjectedCurve.cxx, ProjLib_ProjectedCurve::Load(): treatment of surface of revolution is not symmetric in respect to min and max V range, v1 is not used
Fixed to symmetric behavior. Refactoring.


ifv

2014-04-15 11:24

developer   ~0028836

I. It is useless to check State after
State = TestArret(Func, Blend_OK, Standard_False);
in Blend_Walking::PerformFirstSection(...)
because in this place this method always returns Blend_OK; method is used only to set solution without checking its status.
It is better to use only
     TestArret(Func, Blend_OK, Standard_False);
II. Algorithm of BoundSortBox seems to be correct and not needed to be modified

III. If ff2 is removed, anIsProj2 must be removed too;

IV. Seems to be Ok.

aml

2014-04-16 10:55

developer   ~0028861

Dear ifv,
Please check current state of branch CR24513.

I
Done.

II
After a discussion we decided to do nothing in this case.

III
Done.

ifv

2014-04-16 11:03

developer   ~0028862

Ok

mkv

2014-04-16 11:59

tester   ~0028867

Dear aml,
could you please rebase CR24513 on current master,
there are conflict files.

aml

2014-04-16 12:10

developer   ~0028868

Dear mkv,
Rebase performed. Please test branch CR24513.

mkv

2014-04-18 15:44

tester   ~0028970

Dear BugMaster,

Branch CR24513 (and products from GIT master) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: aa99de641d904a6720e951a108ed01825683a023

Number of compiler warnings:

occt component :
Linux: 19 (18 on master)
Windows: 0 (0 on master)
MacOS: 414 (413 on master)

There is new additional compilation warnings on Linux platform:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/job/mnt-CR24513-master_build_occt_linux/1/warnings16Result/package.1291197015/
IntTools_EdgeFace.cxx:410, GNU C Compiler 4 (gcc), Priority: Normal
unused variable ‘anIsProj2’

There is new additional compilation warnings on MacOS platform:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/job/mnt-CR24513-master_prepare_build_occt_MacOS/1/warnings16Result/package.1330184012/
IntTools_EdgeFace.cxx:410, GNU C Compiler 4 (gcc), Priority: Normal
unused variable 'anIsProj2' [-Wunused-variable]

products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 352315880 / 352653700
Total CPU difference: 52741.12999999978 / 67343.38000000024

Testing on Windows:
Total MEMORY difference: 381308988 / 380717640
Total CPU difference: 30630.203125 / 39760.234375

There are no differences in images found by testdiff.

aml

2014-04-24 08:41

developer   ~0029045

Dear mkv,
Warning is eliminated. Please re-test.

mkv

2014-04-28 15:23

tester   ~0029099

Dear BugMaster,

Branch CR24513 (and products from GIT master) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 275ecaa6cf6a3eb1dd3f216a9b82468c58fadf55

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)
MacOS: 410 (410 on master)

products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 355731248 / 355845808
Total CPU difference: 66972.0500000003 / 55266.979999999734

Testing on Windows:
Total MEMORY difference: 379224540 / 381847264
Total CPU difference: 35791.015625 / 43088.34375

There are no differences in images found by testdiff.

Related Changesets

occt: master 55468283

2014-04-16 06:42:28

aml


Committer: apn Details Diff
0024513: Suspicious code highlighted by 0024510

Blend_Walking_1: value returned by TestArret() deleted.
IntTools_EdgeFace: deleted redundant parameter ff2 and anIsProj2 associated with ff2, since ff2 = !ff1. Refactoring.
ProjLib_ProjectedCurve: treatment of surface of revolution is symmetric for surface of revolution now. Refactoring.
Affected Issues
0024513
mod - src/Blend/Blend_Walking_1.gxx Diff File
mod - src/IntTools/IntTools_EdgeFace.cxx Diff File
mod - src/ProjLib/ProjLib_ProjectedCurve.cxx Diff File

Issue History

Date Modified Username Field Change
2014-01-03 11:46 abv New Issue
2014-01-03 11:46 abv Assigned To => ifv
2014-01-03 11:47 abv Relationship added child of 0024510
2014-01-03 12:04 abv Status new => assigned
2014-01-03 12:24 abv Note Added: 0027380
2014-02-10 15:36 ifv Assigned To ifv => aml
2014-04-04 18:16 abv Target Version 6.7.1 => 6.8.0
2014-04-15 08:19 aml Note Added: 0028832
2014-04-15 08:19 aml Assigned To aml => ifv
2014-04-15 08:19 aml Status assigned => resolved
2014-04-15 11:24 ifv Note Added: 0028836
2014-04-15 11:24 ifv Assigned To ifv => aml
2014-04-15 11:24 ifv Status resolved => feedback
2014-04-16 10:55 aml Note Added: 0028861
2014-04-16 10:55 aml Assigned To aml => ifv
2014-04-16 10:55 aml Status feedback => resolved
2014-04-16 11:03 ifv Note Added: 0028862
2014-04-16 11:03 ifv Status resolved => reviewed
2014-04-16 11:59 mkv Note Added: 0028867
2014-04-16 11:59 mkv Test case number => Not needed
2014-04-16 11:59 mkv Assigned To ifv => aml
2014-04-16 11:59 mkv Status reviewed => feedback
2014-04-16 12:10 aml Note Added: 0028868
2014-04-16 12:10 aml Assigned To aml => mkv
2014-04-16 12:10 aml Status feedback => reviewed
2014-04-18 15:44 mkv Note Added: 0028970
2014-04-18 15:44 mkv Assigned To mkv => aml
2014-04-18 15:44 mkv Status reviewed => assigned
2014-04-24 08:39 aml Assigned To aml => mkv
2014-04-24 08:39 aml Status assigned => resolved
2014-04-24 08:40 aml Status resolved => reviewed
2014-04-24 08:41 aml Note Added: 0029045
2014-04-28 15:23 mkv Note Added: 0029099
2014-04-28 15:23 mkv Assigned To mkv => bugmaster
2014-04-28 15:23 mkv Status reviewed => tested
2014-05-05 17:24 apn Changeset attached => occt master 55468283
2014-05-05 17:24 apn Assigned To bugmaster => apn
2014-05-05 17:24 apn Status tested => verified
2014-05-05 17:24 apn Resolution open => fixed
2014-11-11 12:47 aiv Fixed in Version => 6.8.0
2014-11-11 12:52 aiv Status verified => closed