View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024172 | Open CASCADE | OCCT:Application Framework | public | 2013-09-13 08:55 | 2013-12-19 13:58 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2010 | ||
Product Version | 6.7.0 | ||||
Target Version | 6.7.0 | Fixed in Version | 6.7.0 | ||
Summary | 0024172: Compiler warnings 'unreacheable code' and 'unreferenced local function' in OCAF | ||||
Description | When building with warning level 4, MSVC 10 issues the following warning messages: Warning 19 warning C4702: unreachable code d:\occt\src\tnaming\tnaming.cxx 993 TKCAF Warning 20 warning C4702: unreachable code d:\occt\src\tnaming\tnaming_localizer.cxx 319 TKCAF Warning 21 warning C4702: unreachable code d:\occt\src\tnaming\tnaming_name.cxx 1089 TKCAF Warning 22 warning C4702: unreachable code d:\occt\src\tnaming\tnaming_naming.cxx 558 TKCAF In these places cycle for() is made so that it always breaks after first iteration. If this is intended, such cycles should be replaced by equivalent if(). In addition, in Debug mode the warnings are reported on files called '*Sample': Warning 23 warning C4505: 'Sample' : unreferenced local function has been removed D:\occt\src\DDocStd\DDocStd_Sample.cxx 34 TKDCAF Warning 26 warning C4505: 'Sample' : unreferenced local function has been removed D:\occt\src\DDataStd\DDataStd_Sample.cxx 61 TKDCAF Warning 28 warning C4505: 'Sample' : unreferenced local function has been removed D:\occt\src\DPrsStd\DPrsStd_Sample.cxx 39 TKDCAF Warning 24 warning C4189: 'value' : local variable is initialized but not referenced D:\occt\src\DDataStd\DDataStd_Sample.cxx 103 TKDCAF Warning 27 warning C4189: 'transparency' : local variable is initialized but not referenced D:\occt\src\DPrsStd\DPrsStd_Sample.cxx 201 TKDCAF Warning 29 warning C4189: 'Result_2' : local variable is initialized but not referenced D:\occt\src\QADNaming\QADNaming_Sample.cxx 409 TKQADraw Warning 30 warning C4189: 'Result_1' : local variable is initialized but not referenced D:\occt\src\QADNaming\QADNaming_Sample.cxx 406 TKQADraw Warning 25 warning C4189: 'number' : local variable is initialized but not referenced D:\occt\src\DDataStd\DDataStd_Sample.cxx 353 TKDCAF These are 'samples' not used anywhere and buried inside OCCT code. If they are useful, they can be moved to appropriate samples (Qt or Mfc) or documentation (see 0023962). | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Fixed in CR24172. Sample files can be moved to documentation(for example: appendix of User's Guide). Review, please. |
|
Reviewed, please test. Note that I have rebased CR24172 on current master and removed sample from QADNaming package. I have also registered a separate issue 0024212 for possible restoring the removed sample code in samples and / or documentation. |
|
Dear BugMaster, Branch CR24172 (and products from GIT master) was compiled on Linux and Windows platforms and tested. SHA-1: 8e669dbe1c005bfe7509420b44c9cee4d2cfcb4c Number of compiler warnings: occt component : Linux: 424 (426 on master) Windows: 20 (24 on master) products component : Linux: 189 (190 on master) Windows: 287 (287 on master) Regressions/Differences: No regressions/differences Testing cases: Not needed Testing on Linux: Total MEMORY difference: 365922988 / 366076704 Total CPU difference: 42867.20000000103 / 44692.120000001305 Testing on Windows: Total MEMORY difference: 432692732 / 433333396 Total CPU difference: 37908.84375 / 34585.265625 There are not differences in images found by testdiff. |
occt: master b2197f93 2013-09-30 11:53:00
Committer: bugmaster Details Diff |
0024172: Compiler warnings 'unreacheable code' and 'unreferenced local function' in OCAF Files _Sample.cxx containing unused sample code are removed from several OCAF packages. Cycles for() with body always ending with 'break' are replaced by equivalent if() statements. |
Affected Issues 0024172 |
|
rm - src/DDataStd/DDataStd_Sample.cxx | Diff File | ||
mod - src/DDataStd/FILES | Diff File | ||
rm - src/DDocStd/DDocStd_Sample.cxx | Diff File | ||
mod - src/DDocStd/FILES | Diff File | ||
rm - src/DPrsStd/DPrsStd_Sample.cxx | Diff File | ||
mod - src/DPrsStd/FILES | Diff File | ||
mod - src/QADNaming/FILES | Diff File | ||
rm - src/QADNaming/QADNaming_Sample.cxx | Diff File | ||
mod - src/TNaming/TNaming.cxx | Diff File | ||
mod - src/TNaming/TNaming_Localizer.cxx | Diff File | ||
mod - src/TNaming/TNaming_Name.cxx | Diff File | ||
mod - src/TNaming/TNaming_Naming.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-09-13 08:55 |
|
New Issue | |
2013-09-13 08:55 |
|
Assigned To | => szy |
2013-09-13 08:55 |
|
Status | new => assigned |
2013-09-13 08:55 |
|
Product Version | => 6.7.0 |
2013-09-13 08:55 |
|
Target Version | => 6.7.0 |
2013-09-13 10:58 |
|
Relationship added | related to 0023947 |
2013-09-30 15:57 |
|
Note Added: 0025796 | |
2013-09-30 15:57 |
|
Assigned To | szy => abv |
2013-09-30 15:57 |
|
Status | assigned => resolved |
2013-09-30 16:44 |
|
Note Added: 0025801 | |
2013-09-30 16:44 |
|
Status | resolved => reviewed |
2013-09-30 16:52 |
|
Relationship added | related to 0024212 |
2013-10-01 09:57 |
|
Assigned To | abv => mkv |
2013-10-02 07:57 |
|
Note Added: 0025829 | |
2013-10-02 07:57 |
|
Test case number | => Not needed |
2013-10-02 07:57 |
|
Assigned To | mkv => bugmaster |
2013-10-02 07:57 |
|
Status | reviewed => tested |
2013-10-02 08:37 |
|
Note Edited: 0025829 | |
2013-10-04 12:48 | bugmaster | Changeset attached | => occt master b2197f93 |
2013-10-04 12:48 | bugmaster | Status | tested => verified |
2013-10-04 12:48 | bugmaster | Resolution | open => fixed |
2013-12-19 13:52 | bugmaster | Status | verified => closed |
2013-12-19 13:58 | bugmaster | Fixed in Version | => 6.7.0 |