reform the code.

less warings and errors in vc

svn path=/trunk/; revision=27757
This commit is contained in:
Magnus Olsen 2007-07-20 16:57:59 +00:00
parent f57c2b81f4
commit 7fd0ba2791

View file

@ -505,10 +505,10 @@ NtUserChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
{
BOOL ret = FALSE;
PCLIPBOARDCHAINELEMENT w = NULL;
PWINDOW_OBJECT removeWindow;
UserEnterExclusive();
PWINDOW_OBJECT removeWindow = UserGetWindowObject(hWndRemove);
removeWindow = UserGetWindowObject(hWndRemove);
if (removeWindow)
{
@ -526,9 +526,10 @@ NtUserChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
{
// only send message to the first window in the chain,
// then they do the chain
DPRINT1("Message: WM_CHANGECBCHAIN to %p", WindowsChain->window->hSelf);
/* WindowsChain->window may be NULL */
LPARAM lparam = WindowsChain->window == NULL ? 0 : (LPARAM)WindowsChain->window->hSelf;
DPRINT1("Message: WM_CHANGECBCHAIN to %p", WindowsChain->window->hSelf);
co_IntSendMessage(WindowsChain->window->hSelf, WM_CHANGECBCHAIN, (WPARAM)hWndRemove, lparam);
}
@ -815,7 +816,7 @@ NtUserGetClipboardViewer(VOID)
INT STDCALL
NtUserGetPriorityClipboardFormat(UINT *paFormatPriorityList, INT cFormats)
{
UINT i;
INT i;
UINT *priorityList;
INT ret = 0;
@ -983,10 +984,11 @@ NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size)
INT ret;
BITMAP bm;
BITMAPINFO bi;
BITMAPOBJ *BitmapObj;
hdc = UserGetDCEx(NULL, NULL, DCX_USESTYLE);
BITMAPOBJ *BitmapObj;
BitmapObj = BITMAPOBJ_LockBitmap(hMem);
BITMAP_GetObject(BitmapObj, sizeof(BITMAP), (LPSTR)&bm);
if(BitmapObj)
@ -1068,10 +1070,11 @@ NtUserSetClipboardViewer(HWND hWndNewViewer)
{
HWND ret = NULL;
PCLIPBOARDCHAINELEMENT newWC = NULL;
PWINDOW_OBJECT window;
UserEnterExclusive();
PWINDOW_OBJECT window = UserGetWindowObject(hWndNewViewer);
window = UserGetWindowObject(hWndNewViewer);
if (window)
{