MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029981Open CASCADE[OCCT] OCCT:Codingpublic2018-07-23 21:342018-07-30 10:20
Reporterabv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
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
Attached Files

- Relationships

-  Notes
(0077947)
git (administrator)
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 (administrator)
2018-07-23 22:09

Branch CR29981 has been updated forcibly by abv.

SHA-1: 32f3495c6e623e7424a3e87fb472bc7c350f0de8
(0077949)
abv (manager)
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 (administrator)
2018-07-28 12:38

Branch CR29981 has been deleted by inv.

SHA-1: 32f3495c6e623e7424a3e87fb472bc7c350f0de8

- Related Changesets
occt: master 321659b0
Timestamp: 2018-07-23 18:58:47
Author: 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.
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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker