[ros-diffs] [greatlrd] 27757: reform the code. less warings and errors in vc

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Fri Jul 20 18:58:00 CEST 2007


Author: greatlrd
Date: Fri Jul 20 20:57:59 2007
New Revision: 27757

URL: http://svn.reactos.org/svn/reactos?rev=27757&view=rev
Log:
reform the code. 
less warings and errors in vc

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c?rev=27757&r1=27756&r2=27757&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c Fri Jul 20 20:57:59 2007
@@ -505,20 +505,20 @@
 {
     BOOL ret = FALSE;
     PCLIPBOARDCHAINELEMENT w = NULL;
-
+    PWINDOW_OBJECT removeWindow;
     UserEnterExclusive();
 
-    PWINDOW_OBJECT removeWindow = UserGetWindowObject(hWndRemove);
+    removeWindow = UserGetWindowObject(hWndRemove);
 
     if (removeWindow)
     {
-		if ((ret = !!IntIsWindowInChain(removeWindow)))
-		{
-			w = IntRemoveWindowFromChain(removeWindow);
-			if (w)
-			{
+        if ((ret = !!IntIsWindowInChain(removeWindow)))
+        {
+            w = IntRemoveWindowFromChain(removeWindow);
+            if (w)
+            {
                 ExFreePool(w);
-			}
+            }
         }
     }
 
@@ -526,9 +526,10 @@
     {
         // 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 @@
 INT STDCALL
 NtUserGetPriorityClipboardFormat(UINT *paFormatPriorityList, INT cFormats)
 {
-    UINT i;
+    INT i;
     UINT *priorityList;
     INT ret = 0;
 
@@ -983,10 +984,11 @@
                     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)
@@ -994,16 +996,16 @@
                         BITMAPOBJ_UnlockBitmap(BitmapObj);
                     }
 
-                	bi.bmiHeader.biSize	= sizeof(BITMAPINFOHEADER);
-                	bi.bmiHeader.biWidth = bm.bmWidth;
-                	bi.bmiHeader.biHeight = bm.bmHeight;
-                	bi.bmiHeader.biPlanes = 1;
-                	bi.bmiHeader.biBitCount	= bm.bmPlanes * bm.bmBitsPixel;
-                	bi.bmiHeader.biCompression = BI_RGB;
-                	bi.bmiHeader.biSizeImage = 0;
-                	bi.bmiHeader.biXPelsPerMeter = 0;
-                	bi.bmiHeader.biYPelsPerMeter = 0;
-                	bi.bmiHeader.biClrUsed = 0;
+                    bi.bmiHeader.biSize	= sizeof(BITMAPINFOHEADER);
+                    bi.bmiHeader.biWidth = bm.bmWidth;
+                    bi.bmiHeader.biHeight = bm.bmHeight;
+                    bi.bmiHeader.biPlanes = 1;
+                    bi.bmiHeader.biBitCount	= bm.bmPlanes * bm.bmBitsPixel;
+                    bi.bmiHeader.biCompression = BI_RGB;
+                    bi.bmiHeader.biSizeImage = 0;
+                    bi.bmiHeader.biXPelsPerMeter = 0;
+                    bi.bmiHeader.biYPelsPerMeter = 0;
+                    bi.bmiHeader.biClrUsed = 0;
 
                     ret = NtGdiGetDIBits(hdc, hMem, 0, bm.bmHeight,  NULL, &bi, DIB_RGB_COLORS);
 
@@ -1068,10 +1070,11 @@
 {
     HWND ret = NULL;
     PCLIPBOARDCHAINELEMENT newWC = NULL;
+    PWINDOW_OBJECT window;
 
     UserEnterExclusive();
 
-    PWINDOW_OBJECT window = UserGetWindowObject(hWndNewViewer);
+    window = UserGetWindowObject(hWndNewViewer);
 
     if (window)
     {




More information about the Ros-diffs mailing list