Archived issue #0026668

Eliminate compile warnings obtained by building occt with vc14: conversion requires a narrowing conversion

Open CASCADEOCCT:Codingclosed20 public notes

Search issues

Description

Next warnings appears during occt compilation with vc14:

..\src\IVtkVTK\IVtkVTK_ShapeData.cxx(95): warning C4838: conversion from 'const IVtk_PointId' to 'vtkIdType' requires a narrowing conversion
..\src\IVtkVTK\IVtkVTK_ShapeData.cxx(142): warning C4838: conversion from 'const IVtk_PointId' to 'vtkIdType' requires a narrowing conversion

Steps to reproduce

Try to compile occt with vc14 and vtk (Visual Studio 2015)

Public activity

20 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Wed Sep 9 11:54:02 2015 +0300

    0026668: Eliminate compile warnings obtained by building occt with vc14: conversion requires a narrowing conversion
    
    Warnings "conversion requires a narrowing conversion" were eliminated.
02Commenter 2
Warnings were fixed on vc14.
03Commenter 3
Sergey, please have a look at the fix and consider my question: why IVtk_IdType is defined as Standard_Size and not vtkIdType (that would be natural)?
04Commenter 4
Initially, IVtk package did not depend on any VTK types.
However, with the current packaging this does not make any sense, so it is logical to define IVtk_IdType via vtkIdType rather than add numerous explicit typecasts to the code.
05Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: rkv
Date: Fri Sep 25 13:26:45 2015 +0300

    IVtk_IdType is defined via vtkIdType from now.

06Commenter 6
No remarks, please test
07Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
08Commenter 3
Dear rkv,

-  SM_None      = -1, //!< No selection
-  SM_Shape     =  0, //!< Shape selection
-  SM_Vertex    =  1, //!< Vertex selection
-  SM_Edge      =  2, //!< Edge selection
-  SM_Wire      =  3, //!< Wire selection
-  SM_Face      =  4, //!< Face selection
-  SM_Shell     =  5, //!< Shell selection
-  SM_Solid     =  6, //!< Solid selection
-  SM_CompSolid =  7, //!< CompSolid selection
-  SM_Compound  =  8, //!< Compound selection
+  SM_None = -1, //!< No selection
+  SM_Shape = 0, //!< Shape selection
+  SM_Vertex = 1, //!< Vertex selection
+  SM_Edge = 2, //!< Edge selection
+  SM_Wire = 3, //!< Wire selection
+  SM_Face = 4, //!< Face selection
+  SM_Shell = 5, //!< Shell selection
+  SM_Solid = 6, //!< Solid selection
+  SM_CompSolid = 7, //!< CompSolid selection
+  SM_Compound = 8, //!< Compound selection
...
-  MT_Undefined     = -1, //!< Undefined
-  MT_IsoLine       =  0, //!< Isoline
-  MT_FreeVertex    =  1, //!< Free vertex
-  MT_SharedVertex  =  2, //!< Shared vertex
-  MT_FreeEdge      =  3, //!< Free edge
-  MT_BoundaryEdge  =  4, //!< Boundary edge (related to a single face)
-  MT_SharedEdge    =  5, //!< Shared edge (related to several faces)
-  MT_WireFrameFace =  6, //!< Wireframe face
-  MT_ShadedFace    =  7  //!< Shaded face
+  MT_Undefined = -1, //!< Undefined
+  MT_IsoLine = 0, //!< Isoline
+  MT_FreeVertex = 1, //!< Free vertex
+  MT_SharedVertex = 2, //!< Shared vertex
+  MT_FreeEdge = 3, //!< Free edge
+  MT_BoundaryEdge = 4, //!< Boundary edge (related to a single face)
+  MT_SharedEdge = 5, //!< Shared edge (related to several faces)
+  MT_WireFrameFace = 6, //!< Wireframe face
+  MT_ShadedFace = 7  //!< Shaded face
...
-  DM_Shading   = 1  //!< Shaded display mode
+  DM_Shading = 1  //!< Shaded display mode

what is the purpose of these modifications within this patch?
Please revert them.
09Commenter 9
Dear Commenter 1,
Branch CR2668 was rebased on branch IR-2015-09-24 of occt git-repository.
[revision removed]
10Commenter 10
Dear Commenter 1,
Branch CR2668 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]

There are following compilation errors:
Linux:
http://jenkins-test-01.nnov.opencascade.com:8080/view/CR26668-master/job/CR26668-master_build_occt_linux/1/parsed_console/
...
../../../../src/IVtkOCC/IVtkOCC_ShapePickerAlgo.cxx:345:53: required from here
../../../../inc/NCollection_DefaultHasher.hxx:30:33: error: call of overloaded 'HashCode(const long long int&, const Standard_Integer&)' is ambiguous
...

Number of compiler warnings:

occt component :
Windows: 0 (0 on master)

products component :
Windows: 0 (0 on master)
11Commenter 11
Dear rkv,
Branch [archived branch] has been rejected due to:
- compilation errors
12Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: rkv
Date: Tue Sep 29 18:30:14 2015 +0300

    Merge branch 'CR26668' of git.dev.opencascade.org:occt into CR26668
    
    Conflicts:
        src/IVtk/IVtk_Types.hxx

Author: rkv
Date: Tue Sep 29 18:23:05 2015 +0300

    0026668: Eliminate compile warnings obtained by building occt with vc14: conversion requires a narrowing conversion
    
    Warnings "conversion requires a narrowing conversion" were eliminated.
    
    IVtk_IdType is defined via vtkIdType from now.
    
    Check of target platform for used VTK libraries is added.

13Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
14Commenter 3
Please test the patch on all platforms supporting IVtk.
15Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
16Commenter 16
Dear Commenter 1,
Branch CR26668 was rebased on current master of occt git-repository.
[revision removed]
17Commenter 17
Dear Commenter 1,
Branch CR26668 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms on Release mode.
[revision removed]

There are following compilation errors:
Linux:
http://jenkins-test-01.nnov.opencascade.com:8080/view/CR26668-master/job/CR26668-master_build_occt_linux/1/parsed_console/
../../../../inc/NCollection_DefaultHasher.hxx:30:33: error: call of overloaded 'HashCode(const long long int&, const Standard_Integer&)' is ambiguous
18Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: rkv
Date: Wed Oct 7 10:07:19 2015 +0300

    HashCode for long long is moved into Standard-Integer

19Commenter 3
Dear Commenter 1,

please also switch to tested (see #0026585).
20Commenter 2
Branch [archived branch] has been deleted by Commenter 3.

[revision removed]

Related records