View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014292VTK(No Category)public2013-09-24 04:232015-02-09 15:59
ReporterJames Prichard 
Assigned ToBen Boeckel (Kitware) 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version6.0.0 
Target VersionFixed in Version6.2.0 
Summary0014292: MinGW64 build on Windows7 error in vtkWin32VideoSource::Initialize() call to vtkSetWindowLong (not Ptr)
DescriptionInitial problem reported below - complained about the cast.
I tried removing these casts, so passing 'this' as native size which reveals WINUSERAPI LONG WINAPI SetWindowLongA(HWND hWnd,int nIndex,LONG dwNewLong) is called.
MSDN suggests SetWindowLongPtr() for 64-bit apps.

== build system output ==
[ 93%] Building CXX object IO/Video/CMakeFiles/vtkIOVideo.dir/vtkWin32VideoSource.cxx.obj
/IO/Video/vtkWin32VideoSource.cxx:
In function 'LONG vtkWin32VideoSourceWinProc(HWND, UINT, WPARAM, LPARAM)':
/IO/Video/vtkWin32VideoSource.cxx:105:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     (vtkGetWindowLong(hwnd,vtkGWL_USERDATA));
                                            ^
/IO/Video/vtkWin32VideoSource.cxx: In member function 'virtual void vtkWin32VideoSource::Initialize()':
/IO/Video/vtkWin32VideoSource.cxx:277:71: error: cast from 'vtkWin32VideoSource*' to 'LONG {aka long int}' loses precision [-fpermissive]
   vtkSetWindowLong(this->Internal->ParentWnd,vtkGWL_USERDATA,(vtkLONG)this);
                                                                       ^
In file included from /IO/Video/vtkWin32VideoSource.cxx:31:0:
/IO/Video/vtkWin32VideoSource.cxx:342:52: error: cast from 'vtkWin32VideoSource*' to 'long int' loses precision [-fpermissive]
   if (!capSetUserData(this->Internal->CapWnd,(long)this))
                                                    ^
IO/Video/CMakeFiles/vtkIOVideo.dir/build.make:82: recipe for target `IO/Video/CMakeFiles/vtkIOVideo.dir/vtkWin32VideoSource.cxx.obj' failed
Tagshackaton
ProjectTBD
Typeincorrect functionality
Attached Files

 Relationships

  Notes
(0033517)
Ben Boeckel (Kitware) (developer)
2014-10-02 15:03

Pushed to Gerrit (untested personally; will try it out on my Windows machine later) http://review.source.kitware.com/#/t/4780 [^]
(0034200)
Ben Boeckel (Kitware) (developer)
2015-02-09 15:59

This has been merged.

 Issue History
Date Modified Username Field Change
2013-09-24 04:23 James Prichard New Issue
2014-10-02 14:59 Ben Boeckel (Kitware) Assigned To => Ben Boeckel (Kitware)
2014-10-02 14:59 Ben Boeckel (Kitware) Tag Attached: hackaton
2014-10-02 15:03 Ben Boeckel (Kitware) Note Added: 0033517
2014-10-02 15:03 Ben Boeckel (Kitware) Status backlog => gerrit review
2015-02-09 15:59 Ben Boeckel (Kitware) Note Added: 0034200
2015-02-09 15:59 Ben Boeckel (Kitware) Status gerrit review => closed
2015-02-09 15:59 Ben Boeckel (Kitware) Resolution open => fixed
2015-02-09 15:59 Ben Boeckel (Kitware) Fixed in Version => 6.2.0


Copyright © 2000 - 2018 MantisBT Team