From f66a49a570e483b83df22e76d90e481611d81000 Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Sun, 10 Nov 2013 17:36:13 +0000 Subject: [PATCH] fixed some msdev warnings --- bochs/gui/siminterface.h | 2 +- bochs/gui/win32dialog.cc | 10 +++++----- bochs/gui/win32paramdlg.cc | 6 ++---- bochs/gui/win32paramdlg.h | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/bochs/gui/siminterface.h b/bochs/gui/siminterface.h index 8971aacb8..9a7e84e70 100644 --- a/bochs/gui/siminterface.h +++ b/bochs/gui/siminterface.h @@ -445,7 +445,7 @@ typedef struct { // a type and a spot for a return code (only used for synchronous events). typedef struct { BxEventType type; // what kind is this? - Bit32s retcode; // sucess or failure. only used for synchronous events. + Bit32s retcode; // success or failure. only used for synchronous events. union { BxKeyEvent key; BxMouseEvent mouse; diff --git a/bochs/gui/win32dialog.cc b/bochs/gui/win32dialog.cc index 26f8baa1a..3a79f12a5 100644 --- a/bochs/gui/win32dialog.cc +++ b/bochs/gui/win32dialog.cc @@ -725,25 +725,25 @@ static BOOL CALLBACK MainMenuDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM void LogAskDialog(BxEvent *event) { - event->retcode = DialogBoxParam(NULL, MAKEINTRESOURCE(ASK_DLG), GetBochsWindow(), + event->retcode = (Bit32s) DialogBoxParam(NULL, MAKEINTRESOURCE(ASK_DLG), GetBochsWindow(), (DLGPROC)LogAskProc, (LPARAM)event); } int AskString(bx_param_string_c *param) { - return DialogBoxParam(NULL, MAKEINTRESOURCE(STRING_DLG), GetBochsWindow(), + return (int) DialogBoxParam(NULL, MAKEINTRESOURCE(STRING_DLG), GetBochsWindow(), (DLGPROC)StringParamProc, (LPARAM)param); } int FloppyDialog(bx_param_filename_c *param) { - return DialogBoxParam(NULL, MAKEINTRESOURCE(FLOPPY_DLG), GetBochsWindow(), + return (int) DialogBoxParam(NULL, MAKEINTRESOURCE(FLOPPY_DLG), GetBochsWindow(), (DLGPROC)FloppyDlgProc, (LPARAM)param); } int MainMenuDialog(HWND hwnd, bx_bool runtime) { - return DialogBoxParam(NULL, MAKEINTRESOURCE(MAINMENU_DLG), hwnd, + return (int) DialogBoxParam(NULL, MAKEINTRESOURCE(MAINMENU_DLG), hwnd, (DLGPROC)MainMenuDlgProc, (LPARAM)runtime); } @@ -780,7 +780,7 @@ BxEvent* win32_notify_callback(void *unused, BxEvent *event) } } else if (param->get_type() == BXT_LIST) { SIM->get_first_cdrom()->get_param_path(pname, BX_PATHNAME_LEN); - event->retcode = win32ParamDialog(GetBochsWindow(), pname); + event->retcode = (Bit32s) win32ParamDialog(GetBochsWindow(), pname); return event; } else if (param->get_type() == BXT_PARAM_BOOL) { UINT flag = MB_YESNO | MB_SETFOREGROUND; diff --git a/bochs/gui/win32paramdlg.cc b/bochs/gui/win32paramdlg.cc index 0bd3b8bfa..d3b68d98e 100644 --- a/bochs/gui/win32paramdlg.cc +++ b/bochs/gui/win32paramdlg.cc @@ -1049,13 +1049,11 @@ static INT_PTR CALLBACK ParamDlgProc(HWND Window, UINT AMessage, WPARAM wParam, return 0; } -int win32ParamDialog(HWND parent, const char *menu) +INT_PTR win32ParamDialog(HWND parent, const char *menu) { - INT_PTR ret; - InitDlgFont(); RegisterScrollWindow(NULL); - ret = DialogBoxParam(NULL, MAKEINTRESOURCE(PARAM_DLG), parent, (DLGPROC)ParamDlgProc, (LPARAM)menu); + INT_PTR ret = DialogBoxParam(NULL, MAKEINTRESOURCE(PARAM_DLG), parent, (DLGPROC)ParamDlgProc, (LPARAM)menu); DeleteObject(DlgFont); return ret; } diff --git a/bochs/gui/win32paramdlg.h b/bochs/gui/win32paramdlg.h index a82e36105..dbb82d6fd 100644 --- a/bochs/gui/win32paramdlg.h +++ b/bochs/gui/win32paramdlg.h @@ -26,7 +26,7 @@ #if BX_USE_TEXTCONFIG && defined(WIN32) int AskFilename(HWND hwnd, bx_param_filename_c *param, char *buffer); -int win32ParamDialog(HWND parent, const char *menu); +INT_PTR win32ParamDialog(HWND parent, const char *menu); #endif