[MPlayer-dev-eng] int to ptr problems in mplayer win32 gui with x86_64-w64-ming32
Stephen Sheldon
sfsheldo at gmail.com
Sat Jun 25 23:09:10 CEST 2011
There are some scary warnings in the win32 gui when I compile mplayer with the
x86_64-w64_ming32 compiler. They are like this
gui/win32/dialogs.c: In function 'OpenUrlWndProc':
gui/win32/dialogs.c:299:74: warning: cast from pointer to integer of different
size
The following patch takes care of them.
Index: dialogs.c
===================================================================
--- dialogs.c (revision 33725)
+++ dialogs.c (working copy)
@@ -296,7 +296,7 @@
SendMessage(wdg, EM_SETLIMITTEXT, MAX_PATH, 0);
/*subclass the edit box to capture the VK_RETURN key*/
- OldUrlWndProc = (WNDPROC)SetWindowLongPtr(url, GWLP_WNDPROC,
(LONG_PTR)SubUrlWndProc);
+ OldUrlWndProc = (WNDPROC)SetWindowLongPtr(url, GWLP_WNDPROC,
(LONG_PTR) SubUrlWndProc);
if((f = fopen(history, "r")))
{
@@ -399,7 +399,7 @@
NULL,
hInstance,
NULL);
- SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
ShowWindow(hWnd, SW_SHOW);
UpdateWindow(hWnd);
}
@@ -651,7 +651,7 @@
NULL,
hInstance,
NULL);
- SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD)gui);
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)gui);
updatetracklist(hWnd);
DragAcceptFiles(hWnd,TRUE);
ShowWindow(hWnd, SW_SHOW);
@@ -768,7 +768,7 @@
NULL,
hInstance,
NULL);
- SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
ShowWindow(hWnd, SW_SHOW);
UpdateWindow(hWnd);
}
@@ -897,7 +897,7 @@
NULL,
hInstance,
NULL);
- SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
ShowWindow(hWnd, SW_SHOW);
UpdateWindow(hWnd);
}
@@ -1111,7 +1111,7 @@
NULL,
hInstance,
NULL);
- SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
ShowWindow(hWnd, SW_SHOW);
UpdateWindow(hWnd);
}
More information about the MPlayer-dev-eng
mailing list