DiscussionsIssue archiveOCCT:Application Framework

Archived issue #0022693

Elimination Compiler warnings

CommunityOCCT:Application Frameworkclosed6 public notes

Search issues

Description

Post from the Forum - http://www.opencascade.org/org/forum/thread_21230/.

"Compiler warnings suggest that there may be problems with those 3 files (OCT 6.5.1):
diff --git a/src/TNaming/TNaming_Localizer.cxx b/src/TNaming/TNaming_Localizer.cxx
index 640628b..6864dd6 100644
--- a/src/TNaming/TNaming_Localizer.cxx
+++ b/src/TNaming/TNaming_Localizer.cxx
@@ -244,7 +244,7 @@ const TopTools_IndexedDataMapOfShapeListOfShape& TNaming_Localizer::Ancestors
if (TS == TopAbs_EDGE) TA = TopAbs_FACE;
if (TS == TopAbs_VERTEX) TA = TopAbs_EDGE;
if (TS == TopAbs_FACE) TA = TopAbs_SOLID;// 25.09.2009 - szy
- if (TS == TopAbs_EDGE || TS == TopAbs_VERTEX || TS == TopAbs_FACE && TA >= In.ShapeType()) {
+ if (TS == TopAbs_EDGE || TS == TopAbs_VERTEX || (TS == TopAbs_FACE && TA >= In.ShapeType())) {
TopExp::MapShapesAndAncestors(In, TS, TA, myAncestors.First());
}
else {

Maybe this line is expected instead:
if ((TS == TopAbs_EDGE || TS == TopAbs_VERTEX || TS == TopAbs_FACE) && TA >= In.ShapeType()) {
"

Public activity

6 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Community doesn't provide environment specification for the issue reproducing.
02Commenter 2
Branch 0022693 is created.
The order of operations is specified explicitly. Fixed.
03Commenter 3
For review.
04Commenter 4
The fix reviewed without remarks; please test
05Commenter 5
Dear Commenter 1,
Workbench KAS:dev:mkv-22693-occt was created from SVN branch http://svn/svn/occt/branches/0022693
(and mkv-22693-products from trunk) and compiled on Linux platform.

There are not regressions in mkv-22693-products regarding to KAS:dev:products-652-opt.

See results in /QADisk/occttests/results/KAS/dev/mkv-22693-products_02122011/lin
See reference results in /QAdisk/occttests/results/KAS/dev/products-652-opt_23092011/lin
See test cases in /QAdisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification

06Commenter 1
Integration into trunk of occt repository

Date: 2011-12-16 17:18:52 +0400 (Fri, 16 Dec 2011)
New Revision: 9778

Modified:
   trunk/src/TNaming/TNaming_Localizer.cxx