MantisBT - Open CASCADE
View Issue Details
0029981Open CASCADE[OCCT] OCCT:Codingpublic2018-07-23 21:342018-07-30 10:20
abv 
bugmaster 
normalminor 
closedfixed 
 
[OCCT] 7.4.0[OCCT] 7.4.0 
Not needed
0029981: Coding - Clang 6.0 warning [-Wenum-compare-switch]
When 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:
       ^~~~~~~~~~~~~~
Build with Clang 6.0
No tags attached.
Issue History
2018-07-23 21:34abvNew Issue
2018-07-23 21:34abvAssigned To => kgv
2018-07-23 22:00gitNote Added: 0077947
2018-07-23 22:09gitNote Added: 0077948
2018-07-23 22:13abvNote Added: 0077949
2018-07-23 22:13abvStatusnew => resolved
2018-07-23 22:15kgvAssigned Tokgv => bugmaster
2018-07-23 22:15kgvStatusresolved => reviewed
2018-07-24 18:48bugmasterStatusreviewed => tested
2018-07-28 12:26bugmasterChangeset attached => occt master 321659b0
2018-07-28 12:26bugmasterStatustested => verified
2018-07-28 12:26bugmasterResolutionopen => fixed
2018-07-28 12:38gitNote Added: 0078136
2018-07-30 10:20bugmasterTest case number => Not needed

Notes
(0077947)
git   
2018-07-23 22:00   
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]
(0077948)
git   
2018-07-23 22:09   
Branch CR29981 has been updated forcibly by abv.

SHA-1: 32f3495c6e623e7424a3e87fb472bc7c350f0de8
(0077949)
abv   
2018-07-23 22:13   
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.
(0078136)
git   
2018-07-28 12:38   
Branch CR29981 has been deleted by inv.

SHA-1: 32f3495c6e623e7424a3e87fb472bc7c350f0de8