- delayimp.h: Use FORCEINLINE instead of static __inline__
authorStefan Ginsberg <stefanginsberg@gmail.com>
Fri, 31 Jul 2009 18:21:24 +0000 (18:21 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Fri, 31 Jul 2009 18:21:24 +0000 (18:21 +0000)
- winbase.h: Make winbase.h usable by MSVC
- winuser.h: Add missing const specifiers to GetTabbedTextExtentA/W, TabbedTextOutA/W, ToAscii/Ex and ToUnicode/Ex
- Make gdi32, user32, beepmidi and csrss drmk build in msvc
- Fix most msvc issues in win32k -- a few remain
- Make ntoskrnl compile with /W1 again

svn path=/trunk/; revision=42314

26 files changed:
reactos/dll/win32/beepmidi/beepmidi.c
reactos/dll/win32/gdi32/misc/wingl.c
reactos/dll/win32/gdi32/objects/dc.c
reactos/dll/win32/user32/include/user32.h
reactos/dll/win32/user32/windows/menu.c
reactos/drivers/wdm/audio/drm/drmk/stubs.cpp
reactos/include/psdk/delayimp.h
reactos/include/psdk/winbase.h
reactos/include/psdk/winuser.h
reactos/ntoskrnl/mm/ARM3/expool.c
reactos/ntoskrnl/mm/pool.c
reactos/subsystems/win32/csrss/api/handle.c
reactos/subsystems/win32/csrss/api/wapi.c
reactos/subsystems/win32/win32k/eng/engbrush.c
reactos/subsystems/win32/win32k/eng/engmisc.c
reactos/subsystems/win32/win32k/eng/mem.c
reactos/subsystems/win32/win32k/ldr/loader.c
reactos/subsystems/win32/win32k/ntuser/menu.c
reactos/subsystems/win32/win32k/ntuser/ntstubs.c
reactos/subsystems/win32/win32k/objects/coord.c
reactos/subsystems/win32/win32k/objects/dclife.c
reactos/subsystems/win32/win32k/objects/drawing.c
reactos/subsystems/win32/win32k/objects/gdibatch.c
reactos/subsystems/win32/win32k/objects/gdiobj.c
reactos/subsystems/win32/win32k/objects/path.c
reactos/subsystems/win32/win32k/objects/region.c

index cf9085a..3bbc028 100644 (file)
@@ -142,11 +142,13 @@ ProcessPlayingNotes(
 
         while ( ( node != NULL ) && ( arp_notes <= POLYPHONY ) )
         {
 
         while ( ( node != NULL ) && ( arp_notes <= POLYPHONY ) )
         {
-            DPRINT("playing..\n");
             BEEP_SET_PARAMETERS beep_data;
             DWORD actually_playing = 0;
 
             double frequency = node->note;
             BEEP_SET_PARAMETERS beep_data;
             DWORD actually_playing = 0;
 
             double frequency = node->note;
+
+            DPRINT("playing..\n");
+
             frequency = frequency / 12;
             frequency = pow(2, frequency);
             frequency = 8.1758 * frequency;
             frequency = frequency / 12;
             frequency = pow(2, frequency);
             frequency = 8.1758 * frequency;
@@ -481,10 +483,10 @@ PlayNote(
 {
     HANDLE heap = GetProcessHeap();
 
 {
     HANDLE heap = GetProcessHeap();
 
-    DPRINT("PlayNote\n");
-
     NoteNode* node;
 
     NoteNode* node;
 
+    DPRINT("PlayNote\n");
+
     if ( velocity == 0 )
     {
         DPRINT("Zero velocity\n");
     if ( velocity == 0 )
     {
         DPRINT("Zero velocity\n");
@@ -757,8 +759,8 @@ ProcessLongMidiMessage(
     Exported function that receives messages from WINMM (the MME API.)
 */
 
     Exported function that receives messages from WINMM (the MME API.)
 */
 
-FAR PASCAL
 MMRESULT
 MMRESULT
+FAR PASCAL
 modMessage(
     UINT device_id,
     UINT message,
 modMessage(
     UINT device_id,
     UINT message,
@@ -839,7 +841,8 @@ modMessage(
     Driver entrypoint.
 */
 
     Driver entrypoint.
 */
 
-FAR PASCAL LONG
+LONG
+FAR PASCAL
 DriverProc(
     DWORD driver_id,
     HDRVR driver_handle,
 DriverProc(
     DWORD driver_id,
     HDRVR driver_handle,
index 7e58777..2ba34f3 100644 (file)
 
 
 
 
 
 
-typedef int  WINAPI (*CHOOSEPIXELFMT) (HDC, CONST PIXELFORMATDESCRIPTOR *);
-typedef BOOL WINAPI (*SETPIXELFMT) (HDC, int, CONST PIXELFORMATDESCRIPTOR *);
-typedef BOOL WINAPI (*SWAPBUFFERS) (HDC hdc);
-typedef int  WINAPI (*DESCRIBEPIXELFMT) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
-typedef int  WINAPI (*GETPIXELFMT) (HDC);
+typedef int  (WINAPI *CHOOSEPIXELFMT) (HDC, CONST PIXELFORMATDESCRIPTOR *);
+typedef BOOL (WINAPI *SETPIXELFMT) (HDC, int, CONST PIXELFORMATDESCRIPTOR *);
+typedef BOOL (WINAPI *SWAPBUFFERS) (HDC hdc);
+typedef int  (WINAPI *DESCRIBEPIXELFMT) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
+typedef int  (WINAPI *GETPIXELFMT) (HDC);
 
 
 static CHOOSEPIXELFMT    glChoosePixelFormat   = NULL;
 
 
 static CHOOSEPIXELFMT    glChoosePixelFormat   = NULL;
index 20f6347..72c073f 100644 (file)
@@ -1539,6 +1539,7 @@ SelectObject(HDC hDC,
 {
     PDC_ATTR pDc_Attr;
     HGDIOBJ hOldObj = NULL;
 {
     PDC_ATTR pDc_Attr;
     HGDIOBJ hOldObj = NULL;
+    UINT uType
 //    PTEB pTeb;
 
     if(!GdiGetHandleUserData(hDC, GDI_OBJECT_TYPE_DC, (PVOID)&pDc_Attr))
 //    PTEB pTeb;
 
     if(!GdiGetHandleUserData(hDC, GDI_OBJECT_TYPE_DC, (PVOID)&pDc_Attr))
@@ -1553,7 +1554,7 @@ SelectObject(HDC hDC,
         return NULL;
     }
 
         return NULL;
     }
 
-    UINT uType = GDI_HANDLE_GET_TYPE(hGdiObj);
+    uType = GDI_HANDLE_GET_TYPE(hGdiObj);
 
     switch (uType)
     {
 
     switch (uType)
     {
index 7ae604c..fb43302 100644 (file)
@@ -61,9 +61,11 @@ SharedPtrToUser(PVOID Ptr)
 static __inline PVOID
 DesktopPtrToUser(PVOID Ptr)
 {
 static __inline PVOID
 DesktopPtrToUser(PVOID Ptr)
 {
+    PCLIENTINFO pci;
+    PDESKTOPINFO pdi;
     GetW32ThreadInfo();
     GetW32ThreadInfo();
-    PCLIENTINFO pci = GetWin32ClientInfo();
-    PDESKTOPINFO pdi = pci->pDeskInfo;
+    pci = GetWin32ClientInfo();
+    pdi = pci->pDeskInfo;
 
     ASSERT(Ptr != NULL);
     ASSERT(pdi != NULL);
 
     ASSERT(Ptr != NULL);
     ASSERT(pdi != NULL);
index 101c55b..cae587b 100644 (file)
@@ -1234,9 +1234,10 @@ User32LoadSysMenuTemplateForKernel(PVOID Arguments, ULONG ArgumentLength)
 {
   HMENU hmenu = LoadMenuW(User32Instance, L"SYSMENU");
   LRESULT Result = (LRESULT)hmenu;
 {
   HMENU hmenu = LoadMenuW(User32Instance, L"SYSMENU");
   LRESULT Result = (LRESULT)hmenu;
+  MENUINFO menuinfo = {0};
+  MENUITEMINFOW info = {0};
 
   // removing space for checkboxes from menu
 
   // removing space for checkboxes from menu
-  MENUINFO menuinfo = {0};
   menuinfo.cbSize = sizeof(menuinfo);
   menuinfo.fMask = MIM_STYLE;
   GetMenuInfo(hmenu, &menuinfo);
   menuinfo.cbSize = sizeof(menuinfo);
   menuinfo.fMask = MIM_STYLE;
   GetMenuInfo(hmenu, &menuinfo);
@@ -1244,7 +1245,6 @@ User32LoadSysMenuTemplateForKernel(PVOID Arguments, ULONG ArgumentLength)
   SetMenuInfo(hmenu, &menuinfo);
 
   // adding bitmaps to menu items
   SetMenuInfo(hmenu, &menuinfo);
 
   // adding bitmaps to menu items
-  MENUITEMINFOW info = {0};
   info.cbSize = sizeof(info);
   info.fMask |= MIIM_BITMAP;
   info.hbmpItem = HBMMENU_POPUP_MINIMIZE;
   info.cbSize = sizeof(info);
   info.fMask |= MIIM_BITMAP;
   info.hbmpItem = HBMMENU_POPUP_MINIMIZE;
index 17394c5..be1abc4 100644 (file)
@@ -24,7 +24,8 @@
 /*
  * @unimplemented
  */
 /*
  * @unimplemented
  */
-NTAPI NTSTATUS
+NTSTATUS
+NTAPI
 DrmAddContentHandlers(
     IN  ULONG ContentId,
     IN  PVOID *paHandlers,
 DrmAddContentHandlers(
     IN  ULONG ContentId,
     IN  PVOID *paHandlers,
@@ -41,7 +42,8 @@ DrmAddContentHandlers(
 /*
  * @unimplemented
  */
 /*
  * @unimplemented
  */
-NTAPI NTSTATUS
+NTSTATUS
+NTAPI
 DrmCreateContentMixed(
     IN  PULONG paContentId,
     IN  ULONG cContentId,
 DrmCreateContentMixed(
     IN  PULONG paContentId,
     IN  ULONG cContentId,
@@ -57,7 +59,8 @@ DrmCreateContentMixed(
 /*
  * @unimplemented
  */
 /*
  * @unimplemented
  */
-NTAPI NTSTATUS
+NTSTATUS
+NTAPI
 DrmDestroyContent(
     IN  ULONG ContentId)
 {
 DrmDestroyContent(
     IN  ULONG ContentId)
 {
@@ -72,7 +75,8 @@ DrmDestroyContent(
 /*
  * @unimplemented
  */
 /*
  * @unimplemented
  */
-NTAPI NTSTATUS
+NTSTATUS
+NTAPI
 DrmForwardContentToDeviceObject(
     IN  ULONG ContentId,
     IN  PVOID Reserved,
 DrmForwardContentToDeviceObject(
     IN  ULONG ContentId,
     IN  PVOID Reserved,
@@ -90,7 +94,8 @@ DrmForwardContentToDeviceObject(
 /*
  * @unimplemented
  */
 /*
  * @unimplemented
  */
-NTAPI NTSTATUS
+NTSTATUS
+NTAPI
 DrmForwardContentToFileObject(
     IN  ULONG ContentId,
     IN  PFILE_OBJECT FileObject)
 DrmForwardContentToFileObject(
     IN  ULONG ContentId,
     IN  PFILE_OBJECT FileObject)
@@ -106,7 +111,8 @@ DrmForwardContentToFileObject(
 /*
  * @unimplemented
  */
 /*
  * @unimplemented
  */
-NTAPI NTSTATUS
+NTSTATUS
+NTAPI
 DrmForwardContentToInterface(
     IN  ULONG ContentId,
     IN  PUNKNOWN pUnknown,
 DrmForwardContentToInterface(
     IN  ULONG ContentId,
     IN  PUNKNOWN pUnknown,
@@ -122,7 +128,8 @@ DrmForwardContentToInterface(
 /*
  * @unimplemented
  */
 /*
  * @unimplemented
  */
-NTAPI NTSTATUS
+NTSTATUS
+NTAPI
 DrmGetContentRights(
     IN  ULONG ContentId,
     OUT PDRMRIGHTS DrmRights)
 DrmGetContentRights(
     IN  ULONG ContentId,
     OUT PDRMRIGHTS DrmRights)
@@ -130,4 +137,3 @@ DrmGetContentRights(
     UNIMPLEMENTED;
     return STATUS_UNSUCCESSFUL;
 }
     UNIMPLEMENTED;
     return STATUS_UNSUCCESSFUL;
 }
-
index 986ff44..dbb7ba9 100644 (file)
@@ -65,7 +65,7 @@ typedef struct DelayLoadInfo
 
 typedef FARPROC (WINAPI *PfnDliHook)(unsigned, PDelayLoadInfo);
 
 
 typedef FARPROC (WINAPI *PfnDliHook)(unsigned, PDelayLoadInfo);
 
-static __inline__
+FORCEINLINE
 unsigned
 IndexFromPImgThunkData(PCImgThunkData pData, PCImgThunkData pBase)
 {
 unsigned
 IndexFromPImgThunkData(PCImgThunkData pData, PCImgThunkData pBase)
 {
@@ -74,7 +74,7 @@ IndexFromPImgThunkData(PCImgThunkData pData, PCImgThunkData pBase)
 
 extern const IMAGE_DOS_HEADER __ImageBase;
 
 
 extern const IMAGE_DOS_HEADER __ImageBase;
 
-static __inline__
+FORCEINLINE
 PVOID
 PFromRva(RVA rva)
 {
 PVOID
 PFromRva(RVA rva)
 {
index cf88916..f6b4d8f 100644 (file)
@@ -1872,6 +1872,15 @@ PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY);
 VOID WINAPI InitializeSListHead(PSLIST_HEADER);
 USHORT WINAPI QueryDepthSList(PSLIST_HEADER);
 
 VOID WINAPI InitializeSListHead(PSLIST_HEADER);
 USHORT WINAPI QueryDepthSList(PSLIST_HEADER);
 
+#ifdef _MSC_VER
+
+//
+// Intrinsics are a mess -- *sigh*
+//
+long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand);
+#pragma intrinsic(_InterlockedCompareExchange)
+#endif
+
 #if !defined(InterlockedAnd)
 #define InterlockedAnd InterlockedAnd_Inline
 FORCEINLINE
 #if !defined(InterlockedAnd)
 #define InterlockedAnd InterlockedAnd_Inline
 FORCEINLINE
index 5b6f55c..619718b 100644 (file)
@@ -4090,8 +4090,8 @@ HBRUSH WINAPI GetSysColorBrush(int);
 #define GetSysModalWindow() (NULL)
 HMENU WINAPI GetSystemMenu(HWND,BOOL);
 int WINAPI GetSystemMetrics(int);
 #define GetSysModalWindow() (NULL)
 HMENU WINAPI GetSystemMenu(HWND,BOOL);
 int WINAPI GetSystemMetrics(int);
-DWORD WINAPI GetTabbedTextExtentA(HDC,LPCSTR,int,int,LPINT);
-DWORD WINAPI GetTabbedTextExtentW(HDC,LPCWSTR,int,int,LPINT);
+DWORD WINAPI GetTabbedTextExtentA(HDC,LPCSTR,int,int,CONST LPINT);
+DWORD WINAPI GetTabbedTextExtentW(HDC,LPCWSTR,int,int,CONST LPINT);
 LONG WINAPI GetWindowLongA(HWND,int);
 LONG WINAPI GetWindowLongW(HWND,int);
 #ifdef _WIN64
 LONG WINAPI GetWindowLongA(HWND,int);
 LONG WINAPI GetWindowLongW(HWND,int);
 #ifdef _WIN64
@@ -4411,13 +4411,13 @@ VOID WINAPI SwitchToThisWindow(HWND,BOOL);
 #endif /* (_WIN32_WINNT >= 0x0500) */
 BOOL WINAPI SystemParametersInfoA(UINT,UINT,PVOID,UINT);
 BOOL WINAPI SystemParametersInfoW(UINT,UINT,PVOID,UINT);
 #endif /* (_WIN32_WINNT >= 0x0500) */
 BOOL WINAPI SystemParametersInfoA(UINT,UINT,PVOID,UINT);
 BOOL WINAPI SystemParametersInfoW(UINT,UINT,PVOID,UINT);
-LONG WINAPI TabbedTextOutA(HDC,int,int,LPCSTR,int,int,LPINT,int);
-LONG WINAPI TabbedTextOutW(HDC,int,int,LPCWSTR,int,int,LPINT,int);
+LONG WINAPI TabbedTextOutA(HDC,int,int,LPCSTR,int,int,CONST LPINT,int);
+LONG WINAPI TabbedTextOutW(HDC,int,int,LPCWSTR,int,int,CONST LPINT,int);
 WORD WINAPI TileWindows(HWND,UINT,LPCRECT,UINT,const HWND *);
 WORD WINAPI TileWindows(HWND,UINT,LPCRECT,UINT,const HWND *);
-int WINAPI ToAscii(UINT,UINT,PBYTE,LPWORD,UINT);
-int WINAPI ToAsciiEx(UINT,UINT,PBYTE,LPWORD,UINT,HKL);
-int WINAPI ToUnicode(UINT,UINT,PBYTE,LPWSTR,int,UINT);
-int WINAPI ToUnicodeEx(UINT,UINT,PBYTE,LPWSTR,int,UINT,HKL);
+int WINAPI ToAscii(UINT,UINT,CONST PBYTE,LPWORD,UINT);
+int WINAPI ToAsciiEx(UINT,UINT,CONST PBYTE,LPWORD,UINT,HKL);
+int WINAPI ToUnicode(UINT,UINT,CONST PBYTE,LPWSTR,int,UINT);
+int WINAPI ToUnicodeEx(UINT,UINT,CONST PBYTE,LPWSTR,int,UINT,HKL);
 BOOL WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT);
 BOOL WINAPI TrackPopupMenu(HMENU,UINT,int,int,int,HWND,LPCRECT);
 BOOL WINAPI TrackPopupMenuEx(HMENU,UINT,int,int,HWND,LPTPMPARAMS);
 BOOL WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT);
 BOOL WINAPI TrackPopupMenu(HMENU,UINT,int,int,int,HWND,LPCRECT);
 BOOL WINAPI TrackPopupMenuEx(HMENU,UINT,int,int,HWND,LPTPMPARAMS);
index eb469bb..71450b5 100644 (file)
@@ -379,7 +379,11 @@ ExFreeArmPoolWithTag(IN PVOID P,
     //
     // Quickly deal with big page allocations
     //
     //
     // Quickly deal with big page allocations
     //
-    if (PAGE_ALIGN(P) == P) return (VOID)MiFreePoolPages(P);
+    if (PAGE_ALIGN(P) == P)
+    {
+        (VOID)MiFreePoolPages(P);
+        return;
+    }
     
     //
     // Get the entry for this pool allocation
     
     //
     // Get the entry for this pool allocation
@@ -497,7 +501,8 @@ ExFreeArmPoolWithTag(IN PVOID P,
         // In this case, release the nonpaged pool lock, and free the page
         //
         KeReleaseQueuedSpinLock(LockQueueNonPagedPoolLock, OldIrql);
         // In this case, release the nonpaged pool lock, and free the page
         //
         KeReleaseQueuedSpinLock(LockQueueNonPagedPoolLock, OldIrql);
-        return (VOID)MiFreePoolPages(Entry);
+        (VOID)MiFreePoolPages(Entry);
+        return;
     }
 
     //
     }
 
     //
index dd75a47..64f3398 100644 (file)
@@ -291,7 +291,7 @@ ExFreePoolWithTag(
 #endif
             ExFreePagedPool(Block);
     }
 #endif
             ExFreePagedPool(Block);
     }
-    else if (Block) return ExFreeArmPoolWithTag(Block, Tag);
+    else if (Block) ExFreeArmPoolWithTag(Block, Tag);
     else
     {
         /* Warn only for NULL pointers */
     else
     {
         /* Warn only for NULL pointers */
index 6a8c479..0909c84 100644 (file)
@@ -180,7 +180,7 @@ CsrInsertObject(
         RtlCopyMemory(Block,
                       ProcessData->HandleTable,
                       ProcessData->HandleTableSize * sizeof(CSRSS_HANDLE));
         RtlCopyMemory(Block,
                       ProcessData->HandleTable,
                       ProcessData->HandleTableSize * sizeof(CSRSS_HANDLE));
-        Block = _InterlockedExchangePointer((volatile void*)&ProcessData->HandleTable, Block);
+        Block = _InterlockedExchangePointer((void* volatile)&ProcessData->HandleTable, Block);
         RtlFreeHeap( CsrssApiHeap, 0, Block );
         ProcessData->HandleTableSize += 64;
     }
         RtlFreeHeap( CsrssApiHeap, 0, Block );
         ProcessData->HandleTableSize += 64;
     }
index 50e2fef..ba34621 100644 (file)
@@ -123,7 +123,7 @@ CsrpHandleConnectionRequest (PPORT_MESSAGE Request,
                              IN HANDLE hApiListenPort)
 {
     NTSTATUS Status;
                              IN HANDLE hApiListenPort)
 {
     NTSTATUS Status;
-    HANDLE ServerPort = (HANDLE) 0;
+    HANDLE ServerPort = NULL, ServerThread = NULL;
     PCSRSS_PROCESS_DATA ProcessData = NULL;
     REMOTE_PORT_VIEW LpcRead;
     LpcRead.Length = sizeof(LpcRead);
     PCSRSS_PROCESS_DATA ProcessData = NULL;
     REMOTE_PORT_VIEW LpcRead;
     LpcRead.Length = sizeof(LpcRead);
@@ -167,7 +167,6 @@ CsrpHandleConnectionRequest (PPORT_MESSAGE Request,
         return Status;
     }
 
         return Status;
     }
 
-    HANDLE ServerThread = (HANDLE) 0;
     Status = RtlCreateUserThread(NtCurrentProcess(),
                                  NULL,
                                  FALSE,
     Status = RtlCreateUserThread(NtCurrentProcess(),
                                  NULL,
                                  FALSE,
index 2af10b6..b489bb5 100644 (file)
@@ -156,7 +156,9 @@ EngRealizeBrush(
     }
 
     /* Copy the bits to the new format bitmap */
     }
 
     /* Copy the bits to the new format bitmap */
-    rclDest = (RECTL){0, 0, psoPattern->sizlBitmap.cx, psoPattern->sizlBitmap.cy};
+    rclDest.left = rclDest.top = 0;
+    rclDest.right = psoPattern->sizlBitmap.cx;
+    rclDest.bottom = psoPattern->sizlBitmap.cy;
     EngCopyBits(psoRealize, psoPattern, NULL, pxlo, &rclDest, &ptlSrc);
 
     /* Unlock the bitmap again */
     EngCopyBits(psoRealize, psoPattern, NULL, pxlo, &rclDest, &ptlSrc);
 
     /* Unlock the bitmap again */
index 73557be..a48a4f4 100644 (file)
@@ -250,7 +250,7 @@ EngGetCurrentCodePage(OUT PUSHORT OemCodePage,
                       OUT PUSHORT AnsiCodePage)
 {
     /* Forward to kernel */
                       OUT PUSHORT AnsiCodePage)
 {
     /* Forward to kernel */
-    return RtlGetDefaultCodePage(AnsiCodePage, OemCodePage);
+    RtlGetDefaultCodePage(AnsiCodePage, OemCodePage);
 }
 
 /* EOF */
 }
 
 /* EOF */
index e7aec7e..c337356 100644 (file)
@@ -175,7 +175,7 @@ EngSecureMem(PVOID Address, ULONG Length)
 VOID APIENTRY
 EngUnsecureMem(HANDLE Mem)
 {
 VOID APIENTRY
 EngUnsecureMem(HANDLE Mem)
 {
-  return MmUnsecureVirtualMemory((PVOID) Mem);
+  MmUnsecureVirtualMemory((PVOID) Mem);
 }
 
 /* EOF */
 }
 
 /* EOF */
index d90f76a..2d815c0 100644 (file)
@@ -228,8 +228,9 @@ EngLoadImage (LPWSTR DriverName)
                        DPRINT1("ZwSetSystemInformation failed with Status 0x%lx\n", Status);
                }
                else {
                        DPRINT1("ZwSetSystemInformation failed with Status 0x%lx\n", Status);
                }
                else {
+            PDRIVERS DriverInfo;
                        hImageHandle = (HANDLE)GdiDriverInfo.ImageAddress;
                        hImageHandle = (HANDLE)GdiDriverInfo.ImageAddress;
-                       PDRIVERS DriverInfo = ExAllocatePool(PagedPool, sizeof(DRIVERS));
+                       DriverInfo = ExAllocatePool(PagedPool, sizeof(DRIVERS));
                        DriverInfo->DriverName.MaximumLength = GdiDriverInfo.DriverName.MaximumLength;
                        DriverInfo->DriverName.Length = GdiDriverInfo.DriverName.Length;
                        DriverInfo->DriverName.Buffer = ExAllocatePool(PagedPool, GdiDriverInfo.DriverName.MaximumLength);
                        DriverInfo->DriverName.MaximumLength = GdiDriverInfo.DriverName.MaximumLength;
                        DriverInfo->DriverName.Length = GdiDriverInfo.DriverName.Length;
                        DriverInfo->DriverName.Buffer = ExAllocatePool(PagedPool, GdiDriverInfo.DriverName.MaximumLength);
index 66614e9..f24e411 100644 (file)
@@ -292,6 +292,7 @@ IntDestroyMenuObject(PMENU_OBJECT Menu,
                                          NULL);
       if(NT_SUCCESS(Status))
       {
                                          NULL);
       if(NT_SUCCESS(Status))
       {
+         BOOL ret;
          if (Menu->MenuInfo.Wnd)
          {
             Window = UserGetWindowObject(Menu->MenuInfo.Wnd);
          if (Menu->MenuInfo.Wnd)
          {
             Window = UserGetWindowObject(Menu->MenuInfo.Wnd);
@@ -301,7 +302,7 @@ IntDestroyMenuObject(PMENU_OBJECT Menu,
             }
          }
 //         UserDereferenceObject(Menu);
             }
          }
 //         UserDereferenceObject(Menu);
-         BOOL ret = UserDeleteObject(Menu->MenuInfo.Self, otMenu);
+         ret = UserDeleteObject(Menu->MenuInfo.Self, otMenu);
          ObDereferenceObject(WindowStation);
          return ret;
       }
          ObDereferenceObject(WindowStation);
          return ret;
       }
index 80fd3c3..840e2e4 100644 (file)
@@ -872,9 +872,10 @@ NtUserProcessConnect(
   DPRINT("NtUserProcessConnect\n");
   if (pUserConnect && ( Size == sizeof(USERCONNECT) ))
   {
   DPRINT("NtUserProcessConnect\n");
   if (pUserConnect && ( Size == sizeof(USERCONNECT) ))
   {
+     PPROCESSINFO W32Process;
      UserEnterShared();
      GetW32ThreadInfo();
      UserEnterShared();
      GetW32ThreadInfo();
-     PPROCESSINFO W32Process = PsGetCurrentProcessWin32Process();
+     W32Process = PsGetCurrentProcessWin32Process();
      _SEH2_TRY
      {
         pUserConnect->siClient.psi = gpsi;
      _SEH2_TRY
      {
         pUserConnect->siClient.psi = gpsi;
index 15d5e9b..880cd37 100644 (file)
@@ -127,8 +127,8 @@ IntGdiModifyWorldTransform(
     CONST LPXFORM lpXForm,
     DWORD Mode)
 {
     CONST LPXFORM lpXForm,
     DWORD Mode)
 {
-    ASSERT(pDc);
     XFORM xformWorld2Wnd;
     XFORM xformWorld2Wnd;
+    ASSERT(pDc);
 
     switch (Mode)
     {
 
     switch (Mode)
     {
index 73a1b14..889e748 100644 (file)
@@ -658,7 +658,8 @@ NtGdiCreateCompatibleDC(HDC hDC)
     pdcattrNew->ulDirty_        = pdcattrOld->ulDirty_;
     pdcattrNew->iCS_CP          = pdcattrOld->iCS_CP;
 
     pdcattrNew->ulDirty_        = pdcattrOld->ulDirty_;
     pdcattrNew->iCS_CP          = pdcattrOld->iCS_CP;
 
-    pdcNew->erclWindow = (RECTL){0, 0, 1, 1};
+    pdcNew->erclWindow.left = pdcNew->erclWindow.top = 0;
+    pdcNew->erclWindow.right = pdcNew->erclWindow.bottom = 1;
 
     DC_UnlockDc(pdcNew);
     DC_UnlockDc(pdcOld);
 
     DC_UnlockDc(pdcNew);
     DC_UnlockDc(pdcOld);
index 5b7f1e5..073ee1a 100755 (executable)
@@ -713,8 +713,9 @@ app_fill_ellipse(DC *g, Rect r, PBRUSH pbrush)
 }
 
 static
 }
 
 static
+POINT
 FASTCALL
 FASTCALL
-POINT app_boundary_point(Rect r, int angle)
+app_boundary_point(Rect r, int angle)
 {
        int cx, cy;
        double tangent;
 {
        int cx, cy;
        double tangent;
index 15880c5..8cb32a7 100644 (file)
@@ -25,14 +25,17 @@ DoDeviceSync( SURFOBJ *Surface, PRECTL Rect, FLONG fl)
   if (!(Device->flFlags & PDEV_DRIVER_PUNTED_CALL) && (Surface->dhsurf))
   {
      if (Device->DriverFunctions.SynchronizeSurface)
   if (!(Device->flFlags & PDEV_DRIVER_PUNTED_CALL) && (Surface->dhsurf))
   {
      if (Device->DriverFunctions.SynchronizeSurface)
-        return Device->DriverFunctions.SynchronizeSurface(Surface, Rect, fl);
+     {
+       Device->DriverFunctions.SynchronizeSurface(Surface, Rect, fl);
+     }
      else
      {
        if (Device->DriverFunctions.Synchronize)
      else
      {
        if (Device->DriverFunctions.Synchronize)
-          return Device->DriverFunctions.Synchronize(Surface->dhpdev, Rect);
+       {
+         Device->DriverFunctions.Synchronize(Surface->dhpdev, Rect);
+       }
      }
   }
      }
   }
-  return;  
 }
 
 VOID
 }
 
 VOID
index e197aae..8ad5d23 100644 (file)
@@ -349,6 +349,9 @@ GDIOBJ_AllocObjWithHandle(ULONG ObjectType)
     POBJ  newObject = NULL;
     HANDLE CurrentProcessId, LockedProcessId;
     UCHAR TypeIndex;
     POBJ  newObject = NULL;
     HANDLE CurrentProcessId, LockedProcessId;
     UCHAR TypeIndex;
+    UINT Index;
+    PGDI_TABLE_ENTRY Entry;
+    LONG TypeInfo;
 
     GDIDBG_INITLOOPTRACE();
 
 
     GDIDBG_INITLOOPTRACE();
 
@@ -373,10 +376,6 @@ GDIOBJ_AllocObjWithHandle(ULONG ObjectType)
         return NULL;
     }
 
         return NULL;
     }
 
-    UINT Index;
-    PGDI_TABLE_ENTRY Entry;
-    LONG TypeInfo;
-
     CurrentProcessId = PsGetCurrentProcessId();
     LockedProcessId = (HANDLE)((ULONG_PTR)CurrentProcessId | 0x1);
 
     CurrentProcessId = PsGetCurrentProcessId();
     LockedProcessId = (HANDLE)((ULONG_PTR)CurrentProcessId | 0x1);
 
index 6e76823..3b6a083 100644 (file)
@@ -64,8 +64,9 @@ BOOL
 FASTCALL
 PATH_Delete(HPATH hPath)
 {
 FASTCALL
 PATH_Delete(HPATH hPath)
 {
+  PPATH pPath;
   if (!hPath) return FALSE;
   if (!hPath) return FALSE;
-  PPATH pPath = PATH_LockPath( hPath );
+  pPath = PATH_LockPath( hPath );
   if (!pPath) return FALSE;
   PATH_DestroyGdiPath( pPath );
   PATH_UnlockPath( pPath );
   if (!pPath) return FALSE;
   PATH_DestroyGdiPath( pPath );
   PATH_UnlockPath( pPath );
index 3cada96..4f65116 100644 (file)
@@ -2081,7 +2081,7 @@ VOID FASTCALL
 REGION_Delete(PROSRGNDATA pRgn)
 {
   if ( pRgn == prgnDefault) return;
 REGION_Delete(PROSRGNDATA pRgn)
 {
   if ( pRgn == prgnDefault) return;
-  return REGION_FreeRgn(pRgn);
+  REGION_FreeRgn(pRgn);
 }
 
 
 }