View Issue Details

IDProjectCategoryView StatusLast Update
0029981Open CASCADEOCCT:Codingpublic2018-07-30 10:20
Reporterabv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.4.0Fixed in Version7.4.0 
Summary0029981: Coding - Clang 6.0 warning [-Wenum-compare-switch]
DescriptionWhen compiling current master with Clang 6.0 (on Ubuntu 16.04), I got four compiler warnings:

/home/abv/occt/src/BRepTest/BRepTest_SurfaceCommands.cxx:213:8: warning:
      comparison of two values with different enumeration types in switch
      statement ('BRepBuilderAPI_FaceError' and 'BRepLib_FaceError')
      [-Wenum-compare-switch]
  case BRepLib_ParametersOutOfRange:
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/abv/occt/src/BRepTest/BRepTest_SurfaceCommands.cxx:210:8: warning:
      comparison of two values with different enumeration types in switch
      statement ('BRepBuilderAPI_FaceError' and 'BRepLib_FaceError')
      [-Wenum-compare-switch]
  case BRepLib_CurveProjectionFailed:
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/abv/occt/src/BRepTest/BRepTest_SurfaceCommands.cxx:207:8: warning:
      comparison of two values with different enumeration types in switch
      statement ('BRepBuilderAPI_FaceError' and 'BRepLib_FaceError')
      [-Wenum-compare-switch]
  case BRepLib_NotPlanar:
       ^~~~~~~~~~~~~~~~~
/home/abv/occt/src/BRepTest/BRepTest_SurfaceCommands.cxx:204:8: warning:
      comparison of two values with different enumeration types in switch
      statement ('BRepBuilderAPI_FaceError' and 'BRepLib_FaceError')
      [-Wenum-compare-switch]
  case BRepLib_NoFace:
       ^~~~~~~~~~~~~~
Steps To ReproduceBuild with Clang 6.0
TagsNo tags attached.
Test case numberNot needed

Activities

git

2018-07-23 22:00

administrator   ~0077947

Branch CR29981 has been created by abv.

SHA-1: 72099a8ea4711157b172291dd56d29a2d8b4c721


Detailed log of new commits:

Author: abv
Date: Mon Jul 23 21:58:47 2018 +0300

    0029981: Coding - Clang 6.0 warning [-Wenum-compare-switch]

git

2018-07-23 22:09

administrator   ~0077948

Branch CR29981 has been updated forcibly by abv.

SHA-1: 32f3495c6e623e7424a3e87fb472bc7c350f0de8

abv

2018-07-23 22:13

manager   ~0077949

Fix is pushed to CR29981, please review.

No testing is required because all the values of the enums used before and after the change (BRepLib_FaceError and BRepBuilderAPI_FaceError, respectively) are the same.

git

2018-07-28 12:38

administrator   ~0078136

Branch CR29981 has been deleted by inv.

SHA-1: 32f3495c6e623e7424a3e87fb472bc7c350f0de8

Related Changesets

occt: master 321659b0

2018-07-23 18:58:47

abv


Committer: bugmaster Details Diff
0029981: Coding - Clang 6.0 warning [-Wenum-compare-switch]

In implementation of DRAW command "mkplane", the case labels of the switch statement are corrected to use values of the enum matching the type of the switch argument.
Affected Issues
0029981
mod - src/BRepTest/BRepTest_SurfaceCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2018-07-23 21:34 abv New Issue
2018-07-23 21:34 abv Assigned To => kgv
2018-07-23 22:00 git Note Added: 0077947
2018-07-23 22:09 git Note Added: 0077948
2018-07-23 22:13 abv Note Added: 0077949
2018-07-23 22:13 abv Status new => resolved
2018-07-23 22:15 kgv Assigned To kgv => bugmaster
2018-07-23 22:15 kgv Status resolved => reviewed
2018-07-24 18:48 bugmaster Status reviewed => tested
2018-07-28 12:26 bugmaster Changeset attached => occt master 321659b0
2018-07-28 12:26 bugmaster Status tested => verified
2018-07-28 12:26 bugmaster Resolution open => fixed
2018-07-28 12:38 git Note Added: 0078136
2018-07-30 10:20 bugmaster Test case number => Not needed