From fa832dae4146b1decd54a081648cda79540764a7 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Tue, 10 May 2005 08:15:08 +0000 Subject: [PATCH] fixed some more warnings svn path=/trunk/; revision=15200 --- reactos/subsys/system/regedit/childwnd.c | 2 +- reactos/subsys/system/regedit/framewnd.c | 2 +- reactos/subsys/system/regedit/hexedit.c | 1 + reactos/subsys/system/regedit/main.h | 4 ++-- reactos/subsys/system/regedit/regproc.c | 6 +++--- reactos/subsys/system/regedit/security.c | 4 ++-- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/reactos/subsys/system/regedit/childwnd.c b/reactos/subsys/system/regedit/childwnd.c index d06ef8668f1..f80f86a8ee8 100644 --- a/reactos/subsys/system/regedit/childwnd.c +++ b/reactos/subsys/system/regedit/childwnd.c @@ -131,7 +131,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) * WM_DESTROY - post a quit message and return * */ -INT_PTR CALLBACK +LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { static short last_split; diff --git a/reactos/subsys/system/regedit/framewnd.c b/reactos/subsys/system/regedit/framewnd.c index da7ec43aa36..0718b6a349f 100644 --- a/reactos/subsys/system/regedit/framewnd.c +++ b/reactos/subsys/system/regedit/framewnd.c @@ -642,7 +642,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) * */ -INT_PTR CALLBACK +LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/reactos/subsys/system/regedit/hexedit.c b/reactos/subsys/system/regedit/hexedit.c index 9285fdb7afd..68c3e1286f4 100644 --- a/reactos/subsys/system/regedit/hexedit.c +++ b/reactos/subsys/system/regedit/hexedit.c @@ -21,6 +21,7 @@ #define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ #include #include +#include #include #include "hexedit.h" diff --git a/reactos/subsys/system/regedit/main.h b/reactos/subsys/system/regedit/main.h index 5bce146dcea..96c6d424686 100644 --- a/reactos/subsys/system/regedit/main.h +++ b/reactos/subsys/system/regedit/main.h @@ -80,10 +80,10 @@ extern TCHAR szChildClass[]; extern void ShowAboutBox(HWND hWnd); /* childwnd.c */ -extern INT_PTR CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM); +extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM); /* framewnd.c */ -extern INT_PTR CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM); +extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM); extern void SetupStatusBar(HWND hWnd, BOOL bResize); extern void UpdateStatusBar(void); diff --git a/reactos/subsys/system/regedit/regproc.c b/reactos/subsys/system/regedit/regproc.c index 974e3c0091a..445cdce69a8 100644 --- a/reactos/subsys/system/regedit/regproc.c +++ b/reactos/subsys/system/regedit/regproc.c @@ -231,7 +231,7 @@ char* convertHexToDWORDStr(BYTE *buf, ULONG bufLen) DWORD convertHexCSVToHex(char *str, BYTE *buf, ULONG bufLen) { char *s = str; /* Pointer to current */ - char *b = buf; /* Pointer to result */ + char *b = (char*)buf; /* Pointer to result */ ULONG strLen = strlen(str); ULONG strPos = 0; @@ -405,7 +405,7 @@ HRESULT setValue(LPSTR val_name, LPSTR val_data) } dwLen++; REGPROC_unescape_string(val_data); - lpbData = val_data; + lpbData = (LPBYTE)val_data; } else if (dwParseType == REG_DWORD) /* Convert the dword types */ { dwLen = convertHexToDWord(val_data, convert); @@ -1195,7 +1195,7 @@ void export_hkey(FILE *file, HKEY key, case REG_SZ: case REG_EXPAND_SZ: fputs("\"", file); - REGPROC_export_string(file, *val_buf); + REGPROC_export_string(file, (CHAR*)*val_buf); fputs("\"\n", file); break; diff --git a/reactos/subsys/system/regedit/security.c b/reactos/subsys/system/regedit/security.c index 19f71b2f64f..25f4c5ef31a 100644 --- a/reactos/subsys/system/regedit/security.c +++ b/reactos/subsys/system/regedit/security.c @@ -104,7 +104,7 @@ CRegKeySecurity_fnQueryInterface(LPREGKEYSECURITY this, ULONG STDMETHODCALLTYPE CRegKeySecurity_fnAddRef(LPREGKEYSECURITY this) { - return (ULONG)InterlockedIncrement(&this->ref); + return (ULONG)InterlockedIncrement((LONG*)&this->ref); } ULONG STDMETHODCALLTYPE @@ -112,7 +112,7 @@ CRegKeySecurity_fnRelease(LPREGKEYSECURITY this) { ULONG rfc; - rfc = (ULONG)InterlockedDecrement(&this->ref); + rfc = (ULONG)InterlockedDecrement((LONG*)&this->ref); if(rfc == 0) { HeapFree(GetProcessHeap(), 0, this);