View Issue Details

IDProjectCategoryView StatusLast Update
0024180Open CASCADEOCCT:Codingpublic2013-12-19 13:59
ReporteromyAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformLinuxOSDebian 4.0 
Product Version6.6.0 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024180: Eliminate CLang / GCC compiler warning -Wswitch
DescriptionIt is necessary to eliminate warning -Wswitch (switch statement on enumeration where not all values are explicitly handled), shown by GCC and CLang compilers on Linux
TagsNo tags attached.
Test case numberNot needed

Activities

abv

2013-11-18 06:25

manager   ~0026677

1. DDocStd_ApplicationCommands.cxx: all possible errors should be
   treated in this switch and properly reported. Furthermore, the enum
   PCDM_StoreStatus and its use should be revised: value
   PCDM_SS_WriteFailure seems to be never set, but checked, while
   PCDM_SS_DiskWritingFailure is set but checked only in one place.
   Only one of these two values should be kept and used.
   Value PCDM_SS_UserRightsFailure is never set or checked, to be deleted.

   The same in QABugs_11.cxx

2. In GeomAdaptor_Surface, all cases should be properly handled (no default)

3. In GeomInt_LineConstructor, all cases should be included with assert
   and indication that these cases are handled above

4. HLRBRep_Curve must be checked with JGV. I wonder why e.g. circle
   is not handled here?

5. IntPatch_HInterTool: all cases should be handled explicitly (it was
   intended as it seems).

6. IntPatch_ImpPrmIntersection: please check with IFV -- it seems that
   periodic b-splines are not handled

7. IntPatch_Point: check with IFV -- likely Touch and Undecided should be handled

8. QANaming_IterationCommands: instead of adding default, enum TNaming_REPLACE
   should be removed. If it is needed for compatibility (check with SZY),
   restore it in switches, with assert ensuring that this value will never occur.

9. TopOpeBRep_LineInter -- check with IFV if periodic bsplines are possible here

10. XSDRAWSTLVRML: handle all cases

11. BRepExtrema_DistShapeShape: handle all cases explicitly

ski

2013-11-22 13:26

developer   ~0026844

Remarks were applied:
1. DDocStd_ApplicationCommands.cxx: all possible errors are properly reported.
   Value PCDM_SS_UserRightsFailure were removed.
   Value PCDM_SS_DiskWritingFailure were replaced by PCDM_SS_WriteFailure and removed.
   The same in QABugs_11.cxx

cases 2,3,5,10,11 - all cases were handled

case 4 was discussed with JGV, all is ok, as discussed with ABV, default value was removed

cases 6,7,9 were discussed with IFV, all is ok

case 8 was discussed with SZY, all that remains of the TNaming_REPLACE is need for compatibility

Changes are located in branch CR24180
Please, review

abv

2013-11-22 17:31

manager   ~0026859

Reviewed and checked with ICC (no more warnings on switch). I have made a few corrections, rebased on current master (as one commit), and fixed a few more warnings issued by ICC (type conversions; additional commit).

Please test branch CR24180_1.

mkv

2013-11-26 12:36

tester   ~0026915

Dear BugMaster,

Branch CR24180_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 9de71ff4a58961041ab329496b241b8c5ab93b4c

Number of compiler warnings:

occt component :
Linux: 103 (320 on master)
Windows: 0 (0 on master)

products component :
Linux: 188 (188 on master)
Windows: 286 (286 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 358408272 / 358532660
Total CPU difference: 42268.060000000034 / 43977.070000000385

Testing on Windows:
Total MEMORY difference: 412869216 / 412755496
Total CPU difference: 30866.1875 / 32189.921875

There are not differences in images found by testdiff.

Related Changesets

occt: master 566f8441

2013-11-28 07:13:41

ski


Committer: bugmaster Details Diff
0024180: Eliminate CLang / GCC compiler warning -Wswitch

Eliminated warnings -Wswitch shown by gcc
Eliminated two new warnings about wrong initialization order
Eliminated warnings about unused functions.
A few more ICC warnings (type conversions) fixed
Affected Issues
0024180
mod - src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx Diff File
mod - src/Adaptor3d/Adaptor3d_TopolTool.cxx Diff File
mod - src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx Diff File
mod - src/BinMNaming/BinMNaming_NamedShapeDriver.cxx Diff File
mod - src/BinMNaming/BinMNaming_NamingDriver.cxx Diff File
mod - src/BRepExtrema/BRepExtrema_DistanceSS.cxx Diff File
mod - src/BRepExtrema/BRepExtrema_DistShapeShape.cxx Diff File
mod - src/BRepFill/BRepFill_Pipe.cxx Diff File
mod - src/ChFi3d/ChFi3d_Builder_0.cxx Diff File
mod - src/Contap/Contap_HCurve2dToolGen.gxx Diff File
mod - src/DDocStd/DDocStd_ApplicationCommands.cxx Diff File
mod - src/DNaming/DNaming_TransformationDriver.cxx Diff File
mod - src/Font/Font_FontMgr.cxx Diff File
mod - src/GeomAdaptor/GeomAdaptor_Surface.cxx Diff File
mod - src/GeomInt/GeomInt_LineConstructor.cxx Diff File
mod - src/IntPatch/IntPatch_HInterTool.cxx Diff File
mod - src/IntPatch/IntPatch_ImpPrmIntersection.cxx Diff File
mod - src/IntPatch/IntPatch_Intersection.cxx Diff File
mod - src/IntPatch/IntPatch_Point.cxx Diff File
mod - src/math/math_DoubleTab.gxx Diff File
mod - src/math/math_SingleTab.gxx Diff File
mod - src/MNaming/MNaming_NamedShapeRetrievalDriver.cxx Diff File
mod - src/MNaming/MNaming_NamedShapeStorageDriver.cxx Diff File
mod - src/OpenGl/OpenGl_PrimitiveArray.cxx Diff File
mod - src/OSD/OSD_Error.cxx Diff File
mod - src/PCDM/PCDM.cdl Diff File
mod - src/QABugs/QABugs_11.cxx Diff File
mod - src/QADNaming/QADNaming_IteratorsCommands.cxx Diff File
mod - src/QANewBRepNaming/QANewBRepNaming.cxx Diff File
mod - src/StepFile/step.lex Diff File
mod - src/TObj/TObj.msg Diff File
mod - src/TObj/TObj_Application.cxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_LineInter.cxx Diff File
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.cxx Diff File
mod - src/V3d/V3d_View.cxx Diff File
mod - src/Visual3d/Visual3d_ViewManager.cxx Diff File
mod - src/VrmlData/VrmlData_ShapeConvert.cxx Diff File
mod - src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx Diff File
mod - src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx Diff File

Issue History

Date Modified Username Field Change
2013-09-16 13:25 omy New Issue
2013-09-16 13:25 omy Assigned To => omy
2013-09-16 13:25 omy Status new => assigned
2013-09-27 09:11 abv Assigned To omy => ski
2013-09-27 09:11 abv Summary Eliminate CLang compiler warning -Wswitch => Eliminate CLang / GCC compiler warning -Wswitch
2013-09-27 09:11 abv Description Updated
2013-11-01 10:56 ski Assigned To ski => abv
2013-11-01 10:56 ski Status assigned => resolved
2013-11-18 06:25 abv Note Added: 0026677
2013-11-18 06:25 abv Assigned To abv => ski
2013-11-18 06:25 abv Status resolved => assigned
2013-11-22 13:26 ski Note Added: 0026844
2013-11-22 13:26 ski Assigned To ski => abv
2013-11-22 13:26 ski Status assigned => resolved
2013-11-22 17:31 abv Note Added: 0026859
2013-11-22 17:31 abv Assigned To abv => bugmaster
2013-11-22 17:31 abv Status resolved => reviewed
2013-11-25 08:07 mkv Assigned To bugmaster => mkv
2013-11-26 12:36 mkv Note Added: 0026915
2013-11-26 12:37 mkv Test case number => Not needed
2013-11-26 12:37 mkv Assigned To mkv => bugmaster
2013-11-26 12:37 mkv Status reviewed => tested
2013-12-02 10:21 bugmaster Changeset attached => occt master 566f8441
2013-12-02 10:21 bugmaster Status tested => verified
2013-12-02 10:21 bugmaster Resolution open => fixed
2013-12-19 13:50 bugmaster Status verified => closed
2013-12-19 13:59 bugmaster Fixed in Version => 6.7.0
2014-01-11 11:58 abv Category OCCT Release:BUILD => OCCT:Coding