hw/xwin: Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() to an integer
Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() to an integer: Since HINSTANCE is a pointer type, use INT_PTR rather than int. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
c21344add2
commit
5a47c6420c
@ -621,7 +621,7 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
case ID_ABOUT_CHANGELOG:
|
||||
{
|
||||
int iReturn;
|
||||
INT_PTR iReturn;
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
const char *pszCygPath = "/usr/X11R6/share/doc/"
|
||||
@ -635,12 +635,12 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
"devel/server/changelog.html";
|
||||
#endif
|
||||
|
||||
iReturn = (int) ShellExecute(NULL,
|
||||
iReturn = (INT_PTR) ShellExecute(NULL,
|
||||
"open",
|
||||
pszWinPath, NULL, NULL, SW_MAXIMIZE);
|
||||
if (iReturn < 32) {
|
||||
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_CHANGELOG - "
|
||||
"ShellExecute failed: %d\n", iReturn);
|
||||
"ShellExecute failed: %d\n", (int)iReturn);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
@ -648,14 +648,15 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case ID_ABOUT_WEBSITE:
|
||||
{
|
||||
const char *pszPath = __VENDORDWEBSUPPORT__;
|
||||
int iReturn;
|
||||
INT_PTR iReturn;
|
||||
|
||||
iReturn = (int) ShellExecute(NULL,
|
||||
iReturn = (INT_PTR) ShellExecute(NULL,
|
||||
"open",
|
||||
pszPath, NULL, NULL, SW_MAXIMIZE);
|
||||
if (iReturn < 32) {
|
||||
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_WEBSITE - "
|
||||
"ShellExecute failed: %d\n", iReturn);
|
||||
"ShellExecute failed: %d\n", (int)iReturn);
|
||||
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
@ -663,14 +664,14 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case ID_ABOUT_UG:
|
||||
{
|
||||
const char *pszPath = "http://x.cygwin.com/docs/ug/";
|
||||
int iReturn;
|
||||
INT_PTR iReturn;
|
||||
|
||||
iReturn = (int) ShellExecute(NULL,
|
||||
iReturn = (INT_PTR) ShellExecute(NULL,
|
||||
"open",
|
||||
pszPath, NULL, NULL, SW_MAXIMIZE);
|
||||
if (iReturn < 32) {
|
||||
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_UG - "
|
||||
"ShellExecute failed: %d\n", iReturn);
|
||||
"ShellExecute failed: %d\n", (int)iReturn);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
@ -678,14 +679,14 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case ID_ABOUT_FAQ:
|
||||
{
|
||||
const char *pszPath = "http://x.cygwin.com/docs/faq/";
|
||||
int iReturn;
|
||||
INT_PTR iReturn;
|
||||
|
||||
iReturn = (int) ShellExecute(NULL,
|
||||
iReturn = (INT_PTR) ShellExecute(NULL,
|
||||
"open",
|
||||
pszPath, NULL, NULL, SW_MAXIMIZE);
|
||||
if (iReturn < 32) {
|
||||
ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_FAQ - "
|
||||
"ShellExecute failed: %d\n", iReturn);
|
||||
"ShellExecute failed: %d\n", (int)iReturn);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user