Archived issue #0026668
Eliminate compile warnings obtained by building occt with vc14: conversion requires a narrowing conversion
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
..\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.
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.
[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.
Warnings were fixed on vc14.
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)?
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.
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.
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.
[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.
No remarks, please test
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Dear rkv,
what is the purpose of these modifications within this patch?
Please revert them.
- 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.
Dear Commenter 1,
Branch CR2668 was rebased on branch IR-2015-09-24 of occt git-repository.
[revision removed]
Branch CR2668 was rebased on branch IR-2015-09-24 of occt git-repository.
[revision removed]
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)
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)
Dear rkv,
Branch [archived branch] has been rejected due to:
- compilation errors
Branch [archived branch] has been rejected due to:
- compilation errors
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.
[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.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Please test the patch on all platforms supporting IVtk.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Dear Commenter 1,
Branch CR26668 was rebased on current master of occt git-repository.
[revision removed]
Branch CR26668 was rebased on current master of occt git-repository.
[revision removed]
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
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
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
[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
Branch [archived branch] has been deleted by Commenter 3.
[revision removed]
[revision removed]
Related records