View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0028452 | Open CASCADE | OCCT:VIS | public | 2017-02-11 12:13 | 2018-06-29 21:19 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.3.0 | Fixed in Version | 7.3.0 | ||
Summary | 0028452: VIS - MSVC 14 compiler warnings | ||||
Description | When OCCT is compiled with PCH (see 0028417), MSVC 14 reports multiple warnings in IVtk* packages: Warning C4244 '=': conversion from 'vtkIdType' to 'int', possible loss of data TKIVtk D:\ABV\OCCT\occt\src\IVtkTools\IVtkTools_SubPolyDataFilter.cxx 77 Warning C4305 'argument': truncation from 'double' to 'float' TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw.cxx 370 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 656 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 659 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 662 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 665 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 668 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 671 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 674 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 677 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 680 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 683 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 692 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 702 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 706 Warning C4244 'argument': conversion from 'WPARAM' to 'UINT', possible loss of data TKIVtkDraw D:\ABV\OCCT\occt\src\IVtkDraw\IVtkDraw_Interactor.cxx 711 The reason why these warnings are not detected in standard build is that VTK headers disable several warning messages globally. When PCH is used inclusion of corresponding headers is protected by #pragme warning pus/pop, and thus warning reporting is restored. | ||||
Steps To Reproduce | Wrap inclusion of VTK headers in relevant files: #pragma warning(push) #include .... VTK stuff... #pragma warning(pop) and build. Alternatively, macro VTK_DISPLAY_WIN32_WARNINGS can be #defined before inclusion of VTK headers to prevent disabling warnings | ||||
Tags | No tags attached. | ||||
Test case number | Not required | ||||
|
Branch CR28452 has been created by abv. SHA-1: 83ed97cf98cbc4977d321b520ff58cb107fced8b Detailed log of new commits: Author: abv Date: Tue Aug 15 16:04:45 2017 +0300 0028452: VIS - MSVC 14 compiler warnings Includes of VTK headers are wrapped in #pragmas to ensure that MSVC warning messages disabled by VTK headers are still enabled for OCCT code |
|
Branch CR28452 has been updated forcibly by abv. SHA-1: 08852a373b7995c53a179a4b0473fd96b9210411 |
|
Branch CR28452 has been updated forcibly by abv. SHA-1: c8f26c089f64717f27c2a9dfd927491f0c189f5e |
|
The code has been corrected to avoid compiler warnings in patch for 0028417. Additional correction to prevent unintentional disabling of MSVC compiler warnings for OCCT code due to inclusion of VTK headers is pushed to branch CR28452, please review. The compilation has passed on all platforms, see Jenkins job CR28452-master-abv; testing is not required (no changes in the functional code, only headers). This is intended to be integrated after OCCT 7.2.0 release, to prevent possible tricky problems that may appear with not-yet-tried versions of VTK. |
|
Just an idea:+// prevent disabling some MSVC warning messages by VTK headers +#ifdef _MSC_VER +#pragma warning(push) +#endif #include <vtkActor.h> #include <vtkPolyData.h> #include <vtkPolyDataMapper.h> #include <vtkRenderer.h> #include <vtkSmartPointer.h> +#ifdef _MSC_VER +#pragma warning(pop) +#endif this is repeated many times and specific too msvc, while VTK headers potentially might break diagnostic state within other compilers as well. So it might be better defining a reusable pair of macros for pushing/popping warnings - see "#pragma GCC diagnostic push/pop" available in gcc 4.6+ and similar commands in CLang. |
|
Agreed to process 0028452:0070334 in a separate issue, see 0029128. |
|
Branch CR28452 reviewed without remarks, ready for testing. |
|
Launched : http://jenkins-test-10.nnov.opencascade.com/view/CR28452-master-INV/ |
|
it is suggested to test it after new master for OCCT and Products has been ready. And fix has been rebased on latter |
|
Branch CR28452 has been updated forcibly by inv. SHA-1: 9e8037b864185fe52192c02f0d18a4f4524aa186 |
|
Combination - OCCT branch : CR28452 SHA-1: 9e8037b864185fe52192c02f0d18a4f4524aa186 Products branch : master was compiled on Linux, MacOS and Windows platforms and tested on optimize mode. http://jenkins-test-10.nnov.opencascade.com/view/CR28452-master-INV/ Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: No differences that require special attention Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR28452 has been deleted by kgv. SHA-1: 9e8037b864185fe52192c02f0d18a4f4524aa186 |
occt: master a9660929 2017-08-15 13:04:45
Committer: bugmaster Details Diff |
0028452: VIS - MSVC 14 compiler warnings Includes of VTK headers are wrapped in #pragmas to ensure that MSVC warning messages disabled by VTK headers are still enabled for OCCT code |
Affected Issues 0028452 |
|
mod - src/IVtkDraw/IVtkDraw.cxx | Diff File | ||
mod - src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.cxx | Diff File | ||
mod - src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.hxx | Diff File | ||
mod - src/IVtkDraw/IVtkDraw_Interactor.cxx | Diff File | ||
mod - src/IVtkDraw/IVtkDraw_Interactor.hxx | Diff File | ||
mod - src/IVtkTools/IVtkTools.cxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_DisplayModeFilter.cxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapeDataSource.cxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapeObject.cxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapeObject.hxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapePicker.cxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_ShapePicker.hxx | Diff File | ||
mod - src/IVtkTools/IVtkTools_SubPolyDataFilter.cxx | Diff File | ||
mod - src/IVtkVTK/IVtkVTK_ShapeData.cxx | Diff File | ||
mod - src/IVtkVTK/IVtkVTK_ShapeData.hxx | Diff File | ||
mod - src/IVtkVTK/IVtkVTK_View.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-02-11 12:13 |
|
New Issue | |
2017-02-11 12:13 |
|
Assigned To | => san |
2017-03-06 16:40 |
|
Relationship added | child of 0028417 |
2017-08-15 16:04 | git | Note Added: 0069408 | |
2017-08-15 16:38 | git | Note Added: 0069412 | |
2017-08-15 17:41 | git | Note Added: 0069416 | |
2017-08-15 19:51 |
|
Note Added: 0069424 | |
2017-08-15 19:51 |
|
Status | new => resolved |
2017-08-15 19:51 |
|
Target Version | 7.2.0 => 7.3.0 |
2017-08-15 19:52 |
|
Note Edited: 0069424 | |
2017-09-08 09:52 | kgv | Note Added: 0070334 | |
2017-09-20 19:04 |
|
Note Added: 0070718 | |
2017-09-20 19:18 |
|
Relationship added | parent of 0029128 |
2017-09-20 19:20 |
|
Note Edited: 0070718 | |
2017-09-20 19:21 |
|
Note Added: 0070719 | |
2017-09-20 19:21 |
|
Assigned To | san => bugmaster |
2017-09-20 19:21 |
|
Status | resolved => reviewed |
2017-09-20 19:27 | bugmaster | Note Added: 0070720 | |
2017-09-21 12:35 | bugmaster | Note Added: 0070733 | |
2017-09-21 21:45 | git | Note Added: 0070760 | |
2017-09-22 12:20 | bugmaster | Test case number | => Not required |
2017-09-22 15:31 | bugmaster | Note Added: 0070792 | |
2017-09-22 15:31 | bugmaster | Status | reviewed => tested |
2017-09-22 15:31 | bugmaster | Note Edited: 0070792 | |
2017-09-29 13:26 | bugmaster | Changeset attached | => occt master a9660929 |
2017-09-29 13:26 | bugmaster | Status | tested => verified |
2017-09-29 13:26 | bugmaster | Resolution | open => fixed |
2017-09-29 17:11 | git | Note Added: 0071002 | |
2018-02-08 23:25 |
|
Target Version | 7.3.0 => 7.4.0 |
2018-02-20 12:58 |
|
Target Version | 7.4.0 => 7.3.0 |
2018-06-29 21:15 |
|
Fixed in Version | => 7.3.0 |
2018-06-29 21:19 |
|
Status | verified => closed |