View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023557 | Community | OCCT:DRAW | public | 2012-11-15 16:43 | 2013-04-29 15:23 |
Reporter | Pawel | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | A | OS | L | ||
Product Version | 6.5.4 | ||||
Target Version | 6.6.0 | Fixed in Version | 6.6.0 | ||
Summary | 0023557: V547 Expression 'as1.ToCString() != ""' is always true. To compare strings you should use strcmp() function. qabugs_3.cxx, | ||||
Description | In lines 1005 and 1008: as1.ToCString() != "" as2.ToCString() != "" the conditions is always true, because pointers are compared. Was this intended? What is the intention of the method? Some comment on that: " char *s .... if (s == "Abcd") This code still can print "TRUE" when the 's' variable and Test() function are defined in one module. The compiler does not produce a lot of identical constant strings but uses one string. As a result, the code sometimes seems quite operable. However, you must understand that this code is very bad and you should use special functions for comparison." | ||||
Tags | No tags attached. | ||||
Test case number | |||||
child of | 0023533 | closed | Unitialized variables used, IntTools_TopolTool.cxx |
occt: master 5cbfdb41 2013-03-01 10:12:08
|
0023533: Unitialized variables used, IntTools_TopolTool.cxx Also contains fixes for: 0023534: Unitialized variables used, ShapeAnalysis_TransferParameters.cxx 0023537: Uninitialized variable: MaxUserColor 0023538: Memory leak: cdata 0023557: V547 Expression 'as1.ToCString() != ""' is always true. To compare strings you should use strcmp() function. qabugs_3.cxx, DRAW command for test bugs fclasses buc60724 corrected; test is OK now |
Affected Issues 0023533, 0023534, 0023537, 0023538, 0023557 |
|
mod - src/IntTools/IntTools_TopolTool.cxx | Diff File | ||
mod - src/QABugs/QABugs_3.cxx | Diff File | ||
mod - src/ShapeAnalysis/ShapeAnalysis_TransferParameters.cxx | Diff File | ||
mod - src/Xw/Xw_ColorMap.cxx | Diff File | ||
mod - src/Xw/Xw_open_image.cxx | Diff File | ||
mod - tests/bugs/fclasses/buc60724 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-11-15 16:43 | Pawel | New Issue | |
2012-11-15 16:43 | Pawel | Assigned To | => bugmaster |
2013-02-26 16:08 |
|
Assigned To | bugmaster => omy |
2013-02-26 16:08 |
|
Status | new => assigned |
2013-02-26 17:52 |
|
Relationship added | child of 0023533 |
2013-03-04 20:04 |
|
Changeset attached | => occt master 5cbfdb41 |
2013-03-05 10:08 | bugmaster | Status | assigned => resolved |
2013-03-05 10:08 | bugmaster | Status | resolved => reviewed |
2013-03-05 10:08 | bugmaster | Status | reviewed => verified |
2013-03-05 10:08 | bugmaster | Resolution | open => fixed |
2013-04-23 13:35 |
|
Status | verified => closed |
2013-04-29 15:23 |
|
Fixed in Version | => 6.6.0 |