View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023498 | Open CASCADE | OCCT:Foundation Classes | public | 2012-10-30 07:26 | 2013-04-29 15:21 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.5.4 | ||||
Target Version | 6.6.0 | Fixed in Version | 6.6.0 | ||
Summary | 0023498: Comparison always true in Units_Lexicon::Creates() | ||||
Description | The problem is caused by fix on 0023072 and has been reported by Pawel in note 0023072:0020967: ----- In Units_Lexicon.cxx, Units_Lexicon::Creates() comparing 'i' against 0 (lower, greater or equal) in lines 115, 117, 119, 122 while( i>=0 && ( chain[i] == ' ' || !chain[i] )) chain[i--]=0; if(i<0) continue; i=9; while( i>=0 && ( oper [i] == ' ' || !oper [i] )) oper[i--]=0; i=29; while( i>=0 && ( coeff[i] == ' ' || !coeff[i] )) coeff[i--]=0; is either always 'true' (line 119, 122) or 'false' (lines 115, 117) because 'i' was declared to be of type 'Standard_Size' and so is unsigned. As I'm not sure about the functionality of the method I can't say whether this is critical or not. Consider changing the type of 'i' back to 'Standard_Integer' (although it produces a warning) or changing the logic in the method. | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
child of | 0023072 | closed | Eliminate compiler warnings (level 3) on Windows / MSVC++ |
|
The code of methods Creates() in Units_Lexicon and Units_UnitDictionary has been refactored, please review branch CR23498 |
|
Patch reviewed without remarks. |
|
Dear BugMaster, Branch CR23498 (and products from GIT master) was compiled on Linux and Windows platforms and tested. Regressions: Not detected Improvements: Not detected Testing cases: Not needed |
occt: master 529b95df 2012-11-30 11:31:27
Committer: abv Details Diff |
0023498: Comparison always true in Units_Lexicon::Creates() Method Units_Lexicon::Creates refactored Further refactoring of Units_Lexicon::Creates() and Units_UnitsDictionary::Creates() |
Affected Issues 0023498 |
|
mod - src/Units/Units_Lexicon.cxx | Diff File | ||
mod - src/Units/Units_UnitsDictionary.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-10-30 07:26 |
|
New Issue | |
2012-10-30 07:26 |
|
Assigned To | => abv |
2012-10-30 07:30 |
|
Relationship added | child of 0023072 |
2012-10-30 07:32 |
|
Note Added: 0021998 | |
2012-10-30 07:32 |
|
Assigned To | abv => kgv |
2012-10-30 07:32 |
|
Status | new => resolved |
2012-11-23 10:08 | kgv | Note Added: 0022367 | |
2012-11-23 10:08 | kgv | Assigned To | kgv => bugmaster |
2012-11-23 10:08 | kgv | Status | resolved => reviewed |
2012-11-23 16:51 |
|
Assigned To | bugmaster => mkv |
2012-11-26 14:01 |
|
Note Added: 0022386 | |
2012-11-26 14:01 |
|
Test case number | => Not needed |
2012-11-26 14:01 |
|
Assigned To | mkv => bugmaster |
2012-11-26 14:01 |
|
Status | reviewed => tested |
2012-12-04 13:21 |
|
Changeset attached | => occt master 529b95df |
2012-12-04 13:21 |
|
Assigned To | bugmaster => abv |
2012-12-04 13:21 |
|
Status | tested => verified |
2012-12-04 13:21 |
|
Resolution | open => fixed |
2012-12-10 17:16 |
|
Changeset attached | => occt master 529b95df |
2013-04-23 13:37 |
|
Status | verified => closed |
2013-04-29 15:21 |
|
Fixed in Version | => 6.6.0 |