View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023332 | Community | OCCT:Data Exchange | public | 2012-07-20 14:33 | 2012-11-16 13:17 |
Reporter | Pawel | Assigned To | Pawel | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | A | OS | L | ||
Product Version | 6.5.2 | ||||
Target Version | 6.5.4 | Fixed in Version | 6.5.4 | ||
Summary | 0023332: Expression 'anIndex < 0' is always false. Unsigned type value is never < 0. in Vrmldata_Geometry.cxx | ||||
Description | In line 75 size_t anIndex = (size_t)i; if (anIndex < 0 || anIndex >= myLength) { static gp_XYZ anOrigin (0., 0., 0.); return anOrigin; } As a solution I would check the variable before casting to size_t (or better to Standard_Size). | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
related to | 0023072 | closed | Open CASCADE | Eliminate compiler warnings (level 3) on Windows / MSVC++ |
|
Corresponding git branch pushed. Please review. |
|
I have simplified the fix by converting type of the argument of method Value() to Standard_Size; this is consistent with its use and makes check for its sign unnecessary. Please review |
|
No remarks. Please forward for testing. |
|
Dear BugMaster, The workbenches KAS:dev:apn-23332-occt (GIT branch CR23332) KAS:dev:apn-23332-products (GIT master) were compiled on Linux platform and tested. Regression: Not detected Improvements: Not detected Testing case: Not needed See results in /QADisk/occttests/results/KAS/dev/apn-23332-products_24072012/lin See reference results in /QADisk/occttests/results/KAS/dev/products-20120706-opt_06072012/lin See test cases in /QADisk/occttests/tests/ED |
occt: master 8ad82602 2012-07-27 12:08:57 Details Diff |
0023332: Expression 'anIndex < 0' is always false. Unsigned type value is never < 0. in Vrmldata_Geometry.cxx Examining index sign before casting to Standard_Size. Argument of method VrmlData_ArrayVec3d::Value() changed from Standard_Integer to Standard_Size to be consistent with its use (avoid compiler warnings) |
Affected Issues 0023332 |
|
mod - src/VrmlData/VrmlData_ArrayVec3d.hxx | Diff File | ||
mod - src/VrmlData/VrmlData_Geometry.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-07-20 14:33 | Pawel | New Issue | |
2012-07-20 14:33 | Pawel | Assigned To | => Pawel |
2012-07-20 14:59 | Pawel | Summary | V547 Expression 'anIndex < 0' is always false. Unsigned type value is never < 0. in Vrmldata_Geometry.cxx => Expression 'anIndex < 0' is always false. Unsigned type value is never < 0. in Vrmldata_Geometry.cxx |
2012-07-20 14:59 | Pawel | Note Added: 0021087 | |
2012-07-20 14:59 | Pawel | Assigned To | Pawel => bugmaster |
2012-07-20 14:59 | Pawel | Status | new => resolved |
2012-07-20 15:00 | Pawel | Relationship added | related to 0023072 |
2012-07-23 14:20 |
|
Note Added: 0021111 | |
2012-07-23 14:21 |
|
Assigned To | bugmaster => Pawel |
2012-07-23 14:23 |
|
Note Edited: 0021111 | |
2012-07-23 16:02 | Pawel | Note Added: 0021116 | |
2012-07-23 16:02 | Pawel | Assigned To | Pawel => bugmaster |
2012-07-23 16:02 | Pawel | Status | resolved => reviewed |
2012-07-25 11:12 | apn | Note Added: 0021143 | |
2012-07-25 11:12 | apn | Test case number | => Not needed |
2012-07-25 11:12 | apn | Status | reviewed => tested |
2012-07-30 16:31 | Pawel | Changeset attached | => occt master 8ad82602 |
2012-07-30 16:31 | Pawel | Assigned To | bugmaster => Pawel |
2012-07-30 16:31 | Pawel | Status | tested => verified |
2012-07-30 16:31 | Pawel | Resolution | open => fixed |
2012-11-16 13:14 | bugmaster | Fixed in Version | => 6.5.4 |
2012-11-16 13:17 | bugmaster | Status | verified => closed |