MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023336Community[OCCT] OCCT:Data Exchangepublic2012-07-20 16:542012-11-16 13:17
ReporterPawel 
Assigned ToPawel 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version[OCCT] 6.5.3 
Target Version[OCCT] 6.5.4Fixed in Version[OCCT] 6.5.4 
Summary0023336: The 'strcmp' function returns 0 if corresponding strings are equal.
DescriptionIn RWStepShape_RWAngularLocation.cxx / RWStepShape_RWAngularSize.cxx

there are code blocks:

if (strcmp(text, ".EQUAL.")) aAngleSelection = StepShape_Equal;
else if (strcmp(text, ".LARGE.")) aAngleSelection = StepShape_Large;
else if (strcmp(text, ".SMALL.")) aAngleSelection = StepShape_Small;
else ach->AddFail("Parameter #3 (angle_selection) has not allowed value");

if, for example, text equals to ".EQUAL." the 'strcmp' function will return '0' and so the execution will process to

else if (strcmp(text, ".LARGE.")) aAngleSelection = StepShape_Large;

I don't think it was intended. I think at this point a pattern like:

if (strcmp(text, "STRING_TO_COMPARE") == 0) ...;

was intended.
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0023337closedPawel The 'strcmp' function returns 0 if corresponding strings are equal. (1) 
related to 0023339closedPawel The 'strcmp' function returns 0 if corresponding strings are equal. (2) 

-  Notes
(0021090)
Pawel (developer)
2012-07-20 16:57

Corresponding git branch pushed. Please review.
(0021107)
abv (manager)
2012-07-23 13:52

No remarks, please test
(0021136)
apn (administrator)
2012-07-24 11:59

Dear BugMaster,
The workbenches
KAS:dev:apn-23336-occt (GIT branch CR23336)
KAS:dev:apn-23336-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-23336-products_23072012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120706-opt_06072012/lin
See test cases in /QADisk/occttests/tests/ED

- Related Changesets
occt: master fafad173
Timestamp: 2012-07-20 12:56:44
Author: Pawel
Details ] Diff ]
0023336: The 'strcmp' function returns 0 if corresponding strings are equal.

Checking if the return value from 'strcmp' is '0'.
mod - src/RWStepShape/RWStepShape_RWAngularLocation.cxx Diff ] File ]
mod - src/RWStepShape/RWStepShape_RWAngularSize.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-07-20 16:54 Pawel New Issue
2012-07-20 16:54 Pawel Assigned To => Pawel
2012-07-20 16:57 Pawel Note Added: 0021090
2012-07-20 16:57 Pawel Assigned To Pawel => bugmaster
2012-07-20 16:57 Pawel Status new => resolved
2012-07-20 17:51 Pawel Relationship added related to 0023337
2012-07-20 18:30 Pawel Relationship added related to 0023339
2012-07-23 13:52 abv Note Added: 0021107
2012-07-23 13:52 abv Status resolved => reviewed
2012-07-24 11:59 apn Note Added: 0021136
2012-07-24 11:59 apn Test case number => Not needed
2012-07-24 11:59 apn Status reviewed => tested
2012-07-30 16:31 Pawel Changeset attached => occt master fafad173
2012-07-30 16:32 Pawel Assigned To bugmaster => Pawel
2012-07-30 16:32 Pawel Status tested => verified
2012-07-30 16:32 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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker