From 9cfeba8d37e1c5fe3458ccedc6fb0d91e8e75682 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Mon, 9 Jan 2006 00:36:08 +0000 Subject: [PATCH] fix msvc warnings svn path=/trunk/; revision=20746 --- reactos/subsys/system/servman/about.c | 3 +++ reactos/subsys/system/servman/propsheet.c | 4 +++- reactos/subsys/system/servman/query.c | 2 +- reactos/subsys/system/servman/servman.c | 20 +++++++++++++------- reactos/subsys/system/servman/servman.h | 6 ++---- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/reactos/subsys/system/servman/about.c b/reactos/subsys/system/servman/about.c index d946dfa9295..0d7a86e7529 100644 --- a/reactos/subsys/system/servman/about.c +++ b/reactos/subsys/system/servman/about.c @@ -13,6 +13,9 @@ extern HINSTANCE hInstance; +#ifdef _MSC_VER +#pragma warning(disable : 4100) +#endif BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { diff --git a/reactos/subsys/system/servman/propsheet.c b/reactos/subsys/system/servman/propsheet.c index d8a5b10975a..b49a6bf433d 100644 --- a/reactos/subsys/system/servman/propsheet.c +++ b/reactos/subsys/system/servman/propsheet.c @@ -11,7 +11,9 @@ extern HINSTANCE hInstance; - +#ifdef _MSC_VER +#pragma warning(disable : 4100) +#endif /* Property page dialog callback */ INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, diff --git a/reactos/subsys/system/servman/query.c b/reactos/subsys/system/servman/query.c index af643ab51cb..523b223770d 100644 --- a/reactos/subsys/system/servman/query.c +++ b/reactos/subsys/system/servman/query.c @@ -46,7 +46,7 @@ RefreshServiceList(VOID) /* Create the icon image lists */ hSmall = ImageList_Create(GetSystemMetrics(SM_CXSMICON), - GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR16, 1, 1); + GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR16, 1, 1); /* Add an icon to each image list */ hiconItem = LoadImage(hInstance, MAKEINTRESOURCE(IDI_SM_ICON), IMAGE_ICON, 16, 16, 0); diff --git a/reactos/subsys/system/servman/servman.c b/reactos/subsys/system/servman/servman.c index 1e30eab5574..1e774bc99dd 100644 --- a/reactos/subsys/system/servman/servman.c +++ b/reactos/subsys/system/servman/servman.c @@ -177,12 +177,15 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SendMessage(hStatus, SB_SETPARTS, sizeof(statwidths)/sizeof(int), (LPARAM)statwidths); - /* populate the list view with all services */ + +/* ================= populate the list view with all services =================== */ + if (! RefreshServiceList() ) GetError(); } break; + case WM_SIZE: { RECT rcTool; @@ -241,7 +244,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) // Specify the resource identifier of the descriptive // text for the given button. - idButton = lpttt->hdr.idFrom; + idButton = (UINT)lpttt->hdr.idFrom; switch (idButton) { case ID_PROP: @@ -337,11 +340,13 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) break; case ID_HELP: + MessageBox(NULL, _T("Help is not yet implemented\n"), + _T("Note!"), MB_OK | MB_ICONINFORMATION); break; case ID_EXIT: - PostMessage(hwnd, WM_CLOSE, 0, 0); - break; + PostMessage(hwnd, WM_CLOSE, 0, 0); + break; case ID_VIEW_CUSTOMIZE: break; @@ -362,8 +367,9 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return 0; } - -//#pragma warning(disable : 4100) +#ifdef _MSC_VER +#pragma warning(disable : 4100) +#endif int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { @@ -426,7 +432,7 @@ int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, DispatchMessage(&Msg); } } - return Msg.wParam; + return (int)Msg.wParam; } diff --git a/reactos/subsys/system/servman/servman.h b/reactos/subsys/system/servman/servman.h index f34ddd284ee..691ab5e3926 100644 --- a/reactos/subsys/system/servman/servman.h +++ b/reactos/subsys/system/servman/servman.h @@ -13,15 +13,13 @@ BOOL RefreshServiceList(VOID); -BOOL CALLBACK -AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +BOOL CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); VOID GetError(VOID); VOID FreeMemory(VOID); VOID DisplayString(PTCHAR); -LONG APIENTRY -PropSheets(HWND hwnd); +LONG APIENTRY PropSheets(HWND hwnd); DWORD GetServiceList(VOID);