MantisBT - Community
View Issue Details
0023336Community[OCCT] OCCT:Data Exchangepublic2012-07-20 16:542012-11-16 13:17
Pawel 
Pawel 
normalminor 
closedfixed 
ALL
[OCCT] 6.5.3 
[OCCT] 6.5.4[OCCT] 6.5.4 
Not needed
0023336: The 'strcmp' function returns 0 if corresponding strings are equal.
In 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.
No tags attached.
related to 0023337closed Pawel The 'strcmp' function returns 0 if corresponding strings are equal. (1) 
related to 0023339closed Pawel The 'strcmp' function returns 0 if corresponding strings are equal. (2) 
Issue History
2012-07-20 16:54PawelNew Issue
2012-07-20 16:54PawelAssigned To => Pawel
2012-07-20 16:57PawelNote Added: 0021090
2012-07-20 16:57PawelAssigned ToPawel => bugmaster
2012-07-20 16:57PawelStatusnew => resolved
2012-07-20 17:51PawelRelationship addedrelated to 0023337
2012-07-20 18:30PawelRelationship addedrelated to 0023339
2012-07-23 13:52abvNote Added: 0021107
2012-07-23 13:52abvStatusresolved => reviewed
2012-07-24 11:59apnNote Added: 0021136
2012-07-24 11:59apnTest case number => Not needed
2012-07-24 11:59apnStatusreviewed => tested
2012-07-30 16:31PawelChangeset attached => occt master fafad173
2012-07-30 16:32PawelAssigned Tobugmaster => Pawel
2012-07-30 16:32PawelStatustested => verified
2012-07-30 16:32PawelResolutionopen => fixed
2012-11-16 13:14bugmasterFixed in Version => 6.5.4
2012-11-16 13:17bugmasterStatusverified => closed

Notes
(0021090)
Pawel   
2012-07-20 16:57   
Corresponding git branch pushed. Please review.
(0021107)
abv   
2012-07-23 13:52   
No remarks, please test
(0021136)
apn   
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