View Issue Details

IDProjectCategoryView StatusLast Update
0026167Open CASCADEOCCT:Codingpublic2015-05-14 16:39
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeveritytrivial 
Status closedResolutionfixed 
PlatformMacOSOS 
Product Version6.3.1 
Target Version6.9.0Fixed in Version6.9.0 
Summary0026167: Coding rules - eliminate -Wlogical-not-parentheses CLang warnings in GeomToStep
DescriptionThere is a bunch of -Wlogical-not-parentheses warnings in GeomToStep, which are emitted on logically correct comparison statements, but defined in weird way (usually occurred in misprinted code):
occt/src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx:81:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx:113:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx:135:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx:68:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx:68:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx:151:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx:163:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx:124:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx:90:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx:126:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeCircle.cxx:84:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeConic.cxx:113:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx:62:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeCurve.cxx:172:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx:56:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeDirection.cxx:118:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeElementarySurface.cxx:82:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeEllipse.cxx:84:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeHyperbola.cxx:86:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeLine.cxx:85:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeParabola.cxx:83:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakePlane.cxx:73:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakePolyline.cxx:54:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx:106:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx:56:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeSurface.cxx:85:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx:61:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx:59:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeSweptSurface.cxx:60:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx:57:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~
occt/src/GeomToStep/GeomToStep_MakeVector.cxx:84:28: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
  StdFail_NotDone_Raise_if(!done == Standard_True,"");
                           ^     ~~

It is desired to correct this code.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0024818 closedabv CLang warnings -Wlogical-not-parentheses 
has duplicate 0026067 closedbugmaster Coding Rules - eliminate warnings about suspicious comparisons 

Activities

git

2015-04-30 13:24

administrator   ~0040473

Branch CR26167 has been created by kgv.

SHA-1: 2f0aafa1de9993bf183ab492d845c967f6e8bec5


Detailed log of new commits:

Author: kgv
Date: Thu Apr 30 13:26:01 2015 +0300

    0026167: Coding rules - eliminate -Wlogical-not-parentheses CLang warnings in GeomToStep

kgv

2015-04-30 14:27

developer   ~0040474

Patch is ready for review.

abv

2015-04-30 14:53

manager   ~0040478

Reviewed, can be integrated. The change is trivial thus testing is not really needed, though it can be made if there is no resource conflict with other, functional issues

mkv

2015-05-05 14:51

tester   ~0040557

Last edited: 2015-05-05 14:54

Dear BugMaster,
Branch CR26167 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 2f0aafa1de9993bf183ab492d845c967f6e8bec5

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 4 (4 on master)
Windows: 0 (0 on master)

git

2015-05-14 16:39

administrator   ~0041130

Branch CR26167 has been deleted by inv.

SHA-1: 2f0aafa1de9993bf183ab492d845c967f6e8bec5

Related Changesets

occt: master 11bf7051

2015-04-30 10:26:01

kgv


Committer: bugmaster Details Diff
0026167: Coding rules - eliminate -Wlogical-not-parentheses CLang warnings in GeomToStep Affected Issues
0026167
mod - src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeCircle.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeConic.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeConicalSurface.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeCurve.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeDirection.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeElementarySurface.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeEllipse.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeHyperbola.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeLine.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeParabola.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakePlane.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakePolyline.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeSurface.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeSweptSurface.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx Diff File
mod - src/GeomToStep/GeomToStep_MakeVector.cxx Diff File

Issue History

Date Modified Username Field Change
2015-04-30 09:57 kgv New Issue
2015-04-30 09:57 kgv Assigned To => kgv
2015-04-30 09:57 kgv Relationship added related to 0024818
2015-04-30 09:57 kgv Product Version => 6.9.0
2015-04-30 13:24 git Note Added: 0040473
2015-04-30 14:27 kgv Note Added: 0040474
2015-04-30 14:27 kgv Assigned To kgv => abv
2015-04-30 14:27 kgv Severity integration request => trivial
2015-04-30 14:27 kgv Status new => resolved
2015-04-30 14:53 abv Note Added: 0040478
2015-04-30 14:53 abv Status resolved => reviewed
2015-04-30 14:53 abv Target Version 7.1.0 => 6.9.0
2015-04-30 16:59 kgv Product Version 6.9.0 => 6.3.1
2015-04-30 17:27 mkv Assigned To abv => mkv
2015-05-05 14:51 mkv Note Added: 0040557
2015-05-05 14:51 mkv Assigned To mkv => bugmaster
2015-05-05 14:51 mkv Status reviewed => tested
2015-05-05 14:52 mkv Test case number => Not needed
2015-05-05 14:54 mkv Note Edited: 0040557
2015-05-06 18:24 kgv Relationship added has duplicate 0026067
2015-05-07 11:18 bugmaster Changeset attached => occt master 11bf7051
2015-05-07 11:18 bugmaster Status tested => verified
2015-05-07 11:18 bugmaster Resolution open => fixed
2015-05-14 15:28 aiv Status verified => closed
2015-05-14 15:30 aiv Fixed in Version => 6.9.0
2015-05-14 16:39 git Note Added: 0041130