[WIN32K]: Fix large amount of set-but-unused variables. Most of these seemed to be...
authorSir Richard <sir_richard@svn.reactos.org>
Mon, 6 Sep 2010 23:55:53 +0000 (23:55 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Mon, 6 Sep 2010 23:55:53 +0000 (23:55 +0000)
[WIN32K]: Make IntGdiPaintRgn return the status of the operation, not always TRUE.

svn path=/trunk/; revision=48712

28 files changed:
reactos/subsystems/win32/win32k/dib/dib1bpp.c
reactos/subsystems/win32/win32k/dib/dib8bpp.c
reactos/subsystems/win32/win32k/eng/bitblt.c
reactos/subsystems/win32/win32k/eng/paint.c
reactos/subsystems/win32/win32k/ntuser/class.c
reactos/subsystems/win32/win32k/ntuser/clipboard.c
reactos/subsystems/win32/win32k/ntuser/cursoricon.c
reactos/subsystems/win32/win32k/ntuser/event.c
reactos/subsystems/win32/win32k/ntuser/input.c
reactos/subsystems/win32/win32k/ntuser/keyboard.c
reactos/subsystems/win32/win32k/ntuser/menu.c
reactos/subsystems/win32/win32k/ntuser/message.c
reactos/subsystems/win32/win32k/ntuser/ntuser.c
reactos/subsystems/win32/win32k/ntuser/painting.c
reactos/subsystems/win32/win32k/ntuser/prop.c
reactos/subsystems/win32/win32k/ntuser/scrollbar.c
reactos/subsystems/win32/win32k/ntuser/simplecall.c
reactos/subsystems/win32/win32k/ntuser/window.c
reactos/subsystems/win32/win32k/ntuser/winsta.c
reactos/subsystems/win32/win32k/objects/bitblt.c
reactos/subsystems/win32/win32k/objects/dcattr.c
reactos/subsystems/win32/win32k/objects/device.c
reactos/subsystems/win32/win32k/objects/freetype.c
reactos/subsystems/win32/win32k/objects/gdibatch.c
reactos/subsystems/win32/win32k/objects/palette.c
reactos/subsystems/win32/win32k/objects/path.c
reactos/subsystems/win32/win32k/objects/region.c
reactos/tools/gendib/gendib.c

index ebea73d..3686754 100644 (file)
@@ -82,7 +82,6 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
   int dy2; // dest y end
   int sy1; // src y start
 
-  int dx;
   int shift;
   BYTE srcmask, dstmask, xormask;
 
@@ -139,12 +138,10 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
     pd = d;
     ps = s;
     srcmask = 0xff;
-    dx = dwx; /* dest x for this pass */
     if ( dwx < dl )
     {
       int diff = dl-dwx;
       srcmask &= (1<<(8-diff))-1;
-      dx = dl;
     }
     if ( dwx+7 > dr )
     {
index 95b09cb..3fac604 100644 (file)
@@ -263,7 +263,7 @@ DIB_8BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                         RECTL*  DestRect,  RECTL *SourceRect,
                         XLATEOBJ *ColorTranslation, ULONG iTransColor)
 {
-  ULONG RoundedRight, X, Y, SourceX = 0, SourceY = 0, Source, wd, Dest;
+  ULONG RoundedRight, X, Y, SourceX = 0, SourceY = 0, Source, Dest;
   ULONG *DestBits;
 
   LONG DstHeight;
@@ -279,7 +279,6 @@ DIB_8BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
   RoundedRight = DestRect->right - ((DestRect->right - DestRect->left) & 0x3);
   DestBits = (ULONG*)((PBYTE)DestSurf->pvScan0 + DestRect->left +
                       (DestRect->top * DestSurf->lDelta));
-  wd = DestSurf->lDelta - (DestRect->right - DestRect->left);
 
   for(Y = DestRect->top; Y < DestRect->bottom; Y++)
   {
index 8806aa7..b74e890 100644 (file)
@@ -307,11 +307,9 @@ EngBitBlt(SURFOBJ *DestObj,
     POINTL             Pt;
     ULONG              Direction;
     BOOL               UsesSource;
-    BOOL               UsesPattern;
     POINTL             AdjustedBrushOrigin;
 
     UsesSource = ROP4_USES_SOURCE(rop4);
-    UsesPattern = ROP4_USES_PATTERN(rop4);
     if (R4_NOOP == rop4)
     {
         /* Copy destination onto itself: nop */
index 29cd723..d1290b3 100644 (file)
@@ -36,11 +36,9 @@ static BOOL APIENTRY FillSolidUnlocked(SURFOBJ *pso, PRECTL pRect, ULONG iColor)
 {
   LONG y;
   ULONG LineWidth;
-  SURFACE *psurf;
 
   ASSERT(pso);
   ASSERT(pRect);
-  psurf = CONTAINING_RECORD(pso, SURFACE, SurfObj);
   MouseSafetyOnDrawStart(pso, pRect->left, pRect->top, pRect->right, pRect->bottom);
   LineWidth  = pRect->right - pRect->left;
   DPRINT(" LineWidth: %d, top: %d, bottom: %d\n", LineWidth, pRect->top, pRect->bottom);
index aa06be3..ac6a5b7 100644 (file)
@@ -588,7 +588,7 @@ IntMakeCloneBaseClass(IN OUT PCLS Class,
                       IN OUT PCLS *BaseClassLink,
                       IN OUT PCLS *CloneLink)
 {
-    PCLS Clone, BaseClass;
+    PCLS Clone;
 
     ASSERT(Class->pclsBase != Class);
     ASSERT(Class->pclsBase->pclsClone != NULL);
@@ -601,8 +601,6 @@ IntMakeCloneBaseClass(IN OUT PCLS Class,
     *CloneLink = Class->pclsNext;
     Class->pclsClone = Class->pclsBase->pclsClone;
 
-    BaseClass = Class->pclsBase;
-
     /* update the class information to make it a base class */
     Class->pclsBase = Class;
     Class->pclsNext = (*BaseClassLink)->pclsNext;
@@ -1818,8 +1816,6 @@ UserGetClassInfo(IN PCLS Class,
                  IN BOOL Ansi,
                  HINSTANCE hInstance)
 {
-    PPROCESSINFO pi;
-
     if (!Class) return FALSE;
 
     lpwcx->style = Class->style;
@@ -1828,8 +1824,6 @@ UserGetClassInfo(IN PCLS Class,
     if (Class->fnid)
        lpwcx->style &= ~CS_GLOBALCLASS;
 
-    pi = GetW32ProcessInfo();
-
     lpwcx->lpfnWndProc = IntGetClassWndProc(Class, Ansi);
     
     lpwcx->cbClsExtra = Class->cbclsExtra;
index 0448f6c..81a7667 100644 (file)
@@ -949,7 +949,6 @@ NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size)
                     // because pallette information may change
 
                     HDC hdc;
-                    INT ret;
                     BITMAP bm;
                     BITMAPINFO bi;
                     SURFACE *psurf;
@@ -975,14 +974,14 @@ NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size)
                     bi.bmiHeader.biYPelsPerMeter = 0;
                     bi.bmiHeader.biClrUsed = 0;
 
-                    ret = NtGdiGetDIBitsInternal(hdc, hMem, 0, bm.bmHeight,  NULL, &bi, DIB_RGB_COLORS, 0, 0);
+                    NtGdiGetDIBitsInternal(hdc, hMem, 0, bm.bmHeight,  NULL, &bi, DIB_RGB_COLORS, 0, 0);
 
                     size = bi.bmiHeader.biSizeImage + sizeof(BITMAPINFOHEADER);
 
                     hCBData = ExAllocatePoolWithTag(PagedPool, size, USERTAG_CLIPBOARD);
                     memcpy(hCBData, &bi, sizeof(BITMAPINFOHEADER));
 
-                    ret = NtGdiGetDIBitsInternal(hdc, hMem, 0, bm.bmHeight, (LPBYTE)hCBData + sizeof(BITMAPINFOHEADER), &bi, DIB_RGB_COLORS, 0, 0);
+                    NtGdiGetDIBitsInternal(hdc, hMem, 0, bm.bmHeight, (LPBYTE)hCBData + sizeof(BITMAPINFOHEADER), &bi, DIB_RGB_COLORS, 0, 0);
 
                     UserReleaseDC(NULL, hdc, FALSE);
 
index ff349c8..f439c77 100644 (file)
@@ -109,7 +109,6 @@ UserSetCursor(
     PCURICON_OBJECT OldCursor;
     HCURSOR hOldCursor = (HCURSOR)0;
     HDC hdcScreen;
-    BOOL bResult;
        
        CurInfo = IntGetSysCursorInfo();
 
@@ -141,13 +140,13 @@ UserSetCursor(
         CurInfo->CurrentCursorObject = NewCursor;
 
         /* Call GDI to set the new screen cursor */
-        bResult = GreSetPointerShape(hdcScreen,
-                                     NewCursor->IconInfo.hbmMask,
-                                     NewCursor->IconInfo.hbmColor,
-                                     NewCursor->IconInfo.xHotspot,
-                                     NewCursor->IconInfo.yHotspot,
-                                     gpsi->ptCursor.x,
-                                     gpsi->ptCursor.y);
+        GreSetPointerShape(hdcScreen,
+                           NewCursor->IconInfo.hbmMask,
+                           NewCursor->IconInfo.hbmColor,
+                           NewCursor->IconInfo.xHotspot,
+                           NewCursor->IconInfo.yHotspot,
+                           gpsi->ptCursor.x,
+                           gpsi->ptCursor.y);
 
 
     }
index d170983..3f0d368 100644 (file)
@@ -181,7 +181,6 @@ IntNotifyWinEvent(
 {
    PEVENTHOOK pEH;
    PLIST_ENTRY pLE;
-   LRESULT Result;
 
    DPRINT("IntNotifyWinEvent GlobalEvents = 0x%x pWnd 0x%x\n",GlobalEvents, pWnd);
 
@@ -204,11 +203,11 @@ IntNotifyWinEvent(
            if (!(pEH->idProcess) || !(pEH->idThread) || 
                (NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)(DWORD_PTR)pEH->idProcess))
            {
-              Result = IntCallLowLevelEvent( pEH,
-                                             Event,
-                                             UserHMGetHandle(pWnd),
-                                             idObject,
-                                             idChild);
+              IntCallLowLevelEvent( pEH,
+                                    Event,
+                                    UserHMGetHandle(pWnd),
+                                    idObject,
+                                    idChild);
            }
         }// if ^skip own thread && ((Pid && CPid == Pid && ^skip own process) || all process)
         else if ( !(pEH->Flags & WINEVENT_SKIPOWNTHREAD) &&
@@ -217,7 +216,8 @@ IntNotifyWinEvent(
                      !(pEH->Flags & WINEVENT_SKIPOWNPROCESS)) ||
                      !pEH->idProcess ) )
         {
-           Result = co_IntCallEventProc( UserHMGetHandle(pEH),
+            // What in the deuce is this right-aligned formatting?
+           co_IntCallEventProc(          UserHMGetHandle(pEH),
                                                         Event,
                                         UserHMGetHandle(pWnd),
                                                      idObject,
index 8764e19..c88b08a 100644 (file)
@@ -1236,7 +1236,6 @@ BOOL FASTCALL
 IntKeyboardInput(KEYBDINPUT *ki)
 {
    PUSER_MESSAGE_QUEUE FocusMessageQueue;
-   PTHREADINFO pti;
    MSG Msg;
    LARGE_INTEGER LargeTickCount;
    KBDLLHOOKSTRUCT KbdHookData;
@@ -1339,7 +1338,6 @@ IntKeyboardInput(KEYBDINPUT *ki)
       Msg.time = ki->time;
 
    /* All messages have to contain the cursor point. */
-   pti = PsGetCurrentThreadWin32Thread();
    Msg.pt = gpsi->ptCursor;
    
    KbdHookData.vkCode = vk_hook;
index 70e9054..62b2d7d 100644 (file)
@@ -430,7 +430,6 @@ IntTranslateKbdMessage(LPMSG lpMsg,
    MSG NewMsg = { 0 };
    PKBDTABLES keyLayout;
    BOOL Result = FALSE;
-   DWORD ScanCode = 0;
 
    pti = PsGetCurrentThreadWin32Thread();
    keyLayout = pti->KeyboardLayout->KBTables;
@@ -456,8 +455,6 @@ IntTranslateKbdMessage(LPMSG lpMsg,
         return TRUE;
     }
 
-   ScanCode = (lpMsg->lParam >> 16) & 0xff;
-
    UState = ToUnicodeInner(lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff,
                            gQueueKeyStateTable, wp, 2, 0,
                            keyLayout );
index 4da4922..0e32359 100644 (file)
@@ -959,7 +959,6 @@ DWORD FASTCALL
 IntBuildMenuItemList(PMENU_OBJECT MenuObject, PVOID Buffer, ULONG nMax)
 {
    DWORD res = 0;
-   UINT sz;
    ROSMENUITEMINFO mii;
    PVOID Buf;
    PMENU_ITEM CurItem = MenuObject->MenuItemList;
@@ -976,7 +975,6 @@ IntBuildMenuItemList(PMENU_OBJECT MenuObject, PVOID Buffer, ULONG nMax)
       StrOut = (PWCHAR)((char *) Buffer + MenuObject->MenuInfo.MenuItemCount
                         * sizeof(ROSMENUITEMINFO));
       nMax -= MenuObject->MenuInfo.MenuItemCount * sizeof(ROSMENUITEMINFO);
-      sz = sizeof(ROSMENUITEMINFO);
       Buf = Buffer;
       mii.cbSize = sizeof(ROSMENUITEMINFO);
       mii.fMask = 0;
index b6ed7e5..1d7a0b3 100644 (file)
@@ -1868,7 +1868,6 @@ UserSendNotifyMessage( HWND hWnd,
      ULONG_PTR PResult;
      PTHREADINFO pti;
      PWINDOW_OBJECT Window;
-     MSG Message;
 
       if ( !(Window = UserGetWindowObject(hWnd)) ) return FALSE;
 
@@ -1880,11 +1879,6 @@ UserSendNotifyMessage( HWND hWnd,
       }
       else
       { // Handle message and callback.
-         Message.hwnd = hWnd;
-         Message.message = Msg;
-         Message.wParam = wParam;
-         Message.lParam = lParam;
-
          Result = co_IntSendMessageTimeoutSingle( hWnd,
                                                   Msg,
                                                   wParam,
index b8f1784..14857b0 100644 (file)
@@ -97,8 +97,6 @@ UserInitialize(
   HANDLE  hPowerRequestEvent,
   HANDLE  hMediaRequestEvent)
 {
-    NTSTATUS Status;
-
 // Set W32PF_Flags |= (W32PF_READSCREENACCESSGRANTED | W32PF_IOWINSTA)
 // Create Object Directory,,, Looks like create workstation. "\\Windows\\WindowStations"
 // Create Event for Diconnect Desktop.
@@ -116,7 +114,7 @@ UserInitialize(
    
 //    Callback to User32 Client Thread Setup
 
-    Status = co_IntClientThreadSetup();
+    co_IntClientThreadSetup();
 
 // }
 // Set Global SERVERINFO Error flags.
index 7aba254..d847021 100644 (file)
@@ -103,7 +103,6 @@ IntCalcWindowRgn(PWINDOW_OBJECT Window, BOOL Client)
 {
    PWND Wnd;
    HRGN hRgnWindow;
-   UINT RgnType;
 
    Wnd = Window->Wnd;
    if (Client)
@@ -116,7 +115,7 @@ IntCalcWindowRgn(PWINDOW_OBJECT Window, BOOL Client)
       NtGdiOffsetRgn(hRgnWindow,
          -Wnd->rcWindow.left,
          -Wnd->rcWindow.top);
-      RgnType = NtGdiCombineRgn(hRgnWindow, hRgnWindow, Window->hrgnClip, RGN_AND);
+      NtGdiCombineRgn(hRgnWindow, hRgnWindow, Window->hrgnClip, RGN_AND);
       NtGdiOffsetRgn(hRgnWindow,
          Wnd->rcWindow.left,
          Wnd->rcWindow.top);
@@ -728,15 +727,13 @@ co_IntFixCaret(PWINDOW_OBJECT Window, RECTL *lprc, UINT flags)
    if (WndCaret == Window ||
          ((flags & SW_SCROLLCHILDREN) && IntIsChildWindow(Window, WndCaret)))
    {
-      POINT pt, FromOffset, ToOffset, Offset;
+      POINT pt, FromOffset, ToOffset;
       RECTL rcCaret;
 
       pt.x = CaretInfo->Pos.x;
       pt.y = CaretInfo->Pos.y;
       IntGetClientOrigin(WndCaret, &FromOffset);
       IntGetClientOrigin(Window, &ToOffset);
-      Offset.x = FromOffset.x - ToOffset.x;
-      Offset.y = FromOffset.y - ToOffset.y;
       rcCaret.left = pt.x;
       rcCaret.top = pt.y;
       rcCaret.right = pt.x + CaretInfo->Size.cx;
index c596c0e..5e032a6 100644 (file)
@@ -57,14 +57,12 @@ BOOL FASTCALL
 IntRemoveProp(PWINDOW_OBJECT Window, ATOM Atom)
 {
    PPROPERTY Prop;
-   HANDLE Data;
    Prop = IntGetProp(Window, Atom);
 
    if (Prop == NULL)
    {
       return FALSE;
    }
-   Data = Prop->Data;
    RemoveEntryList(&Prop->PropListEntry);
    UserHeapFree(Prop);
    Window->Wnd->PropListItems--;
index 8efd872..787a0e3 100644 (file)
@@ -470,7 +470,6 @@ co_IntCreateScrollBars(PWINDOW_OBJECT Window)
 {
    PSCROLLBARINFO psbi;
    LPSCROLLINFO psi;
-   LRESULT Result;
    ULONG Size, s;
    INT i;
 
@@ -492,9 +491,9 @@ co_IntCreateScrollBars(PWINDOW_OBJECT Window)
 
    RtlZeroMemory(Window->pSBInfo, Size);
 
-   Result = co_WinPosGetNonClientSize(Window,
-                                      &Window->Wnd->rcWindow,
-                                      &Window->Wnd->rcClient);
+   co_WinPosGetNonClientSize(Window,
+                             &Window->Wnd->rcWindow,
+                             &Window->Wnd->rcClient);
 
    for(s = SB_HORZ; s <= SB_VERT; s++)
    {
index bf26bc2..7c4d222 100644 (file)
@@ -698,7 +698,6 @@ NtUserCallHwndParamLock(
 {
    DWORD Ret = 0;
    PWINDOW_OBJECT Window;
-   PWND Wnd;
    USER_REFERENCE_ENTRY Ref;
    DECLARE_RETURN(DWORD);
 
@@ -711,8 +710,6 @@ NtUserCallHwndParamLock(
    }
    UserRefObjectCo(Window, &Ref);
 
-   Wnd = Window->Wnd;
-
    switch (Routine)
    {
       case TWOPARAM_ROUTINE_VALIDATERGN:
index 5379fcb..5c71931 100644 (file)
@@ -1562,12 +1562,11 @@ IntFixWindowCoordinates(CREATESTRUCTW* Cs, PWINDOW_OBJECT ParentWindow, DWORD* d
    /* default positioning for overlapped windows */
     if(!(Cs->style & (WS_POPUP | WS_CHILD)))
    {
-      RECTL rc, WorkArea;
+      RECTL WorkArea;
       PRTL_USER_PROCESS_PARAMETERS ProcessParams;
 
       UserSystemParametersInfo(SPI_GETWORKAREA, 0, &WorkArea, 0);
 
-      rc = WorkArea;
       ProcessParams = PsGetCurrentProcess()->Peb->ProcessParameters;
 
       if (IS_DEFAULT(Cs->x))
@@ -2971,9 +2970,8 @@ PWINDOW_OBJECT FASTCALL UserGetAncestor(PWINDOW_OBJECT Wnd, UINT Type)
 
             for (;;)
             {
-               PWINDOW_OBJECT Parent, Old;
+               PWINDOW_OBJECT Parent;
 
-               Old = WndAncestor;
                Parent = IntGetParent(WndAncestor);
 
                if (!Parent)
@@ -3075,7 +3073,6 @@ NtUserGetInternalWindowPos( HWND hWnd,
                             LPPOINT ptIcon)
 {
    PWINDOW_OBJECT Window;
-   PWND Wnd;
    DWORD Ret = 0;
    BOOL Hit = FALSE;
    WINDOWPLACEMENT wndpl;
@@ -3087,7 +3084,6 @@ NtUserGetInternalWindowPos( HWND hWnd,
       Hit = FALSE;
       goto Exit;
    }
-   Wnd = Window->Wnd;
 
    _SEH2_TRY
    {
@@ -4435,7 +4431,6 @@ NtUserWindowFromPoint(LONG X, LONG Y)
    if ((DesktopWindow = UserGetWindowObject(IntGetDesktopWindow())))
    {
       PTHREADINFO pti;
-      USHORT Hit;
 
       pt.x = X;
       pt.y = Y;
@@ -4445,7 +4440,7 @@ NtUserWindowFromPoint(LONG X, LONG Y)
       UserRefObjectCo(DesktopWindow, &Ref);
 
       pti = PsGetCurrentThreadWin32Thread();
-      Hit = co_WinPosWindowFromPoint(DesktopWindow, pti->MessageQueue, &pt, &Window);
+      co_WinPosWindowFromPoint(DesktopWindow, pti->MessageQueue, &pt, &Window);
 
       if(Window)
       {
index c4714c7..09810d2 100644 (file)
@@ -995,7 +995,6 @@ IntGetWinStaObj(VOID)
 BOOL APIENTRY
 NtUserSetProcessWindowStation(HWINSTA hWindowStation)
 {
-   HANDLE hOld;
    PWINSTATION_OBJECT NewWinSta;
    NTSTATUS Status;
 
@@ -1028,7 +1027,7 @@ NtUserSetProcessWindowStation(HWINSTA hWindowStation)
     */
 
    /* FIXME - dereference the old window station, etc... */
-   hOld = InterlockedExchangePointer(&PsGetCurrentProcess()->Win32WindowStation, hWindowStation);
+   InterlockedExchangePointer(&PsGetCurrentProcess()->Win32WindowStation, hWindowStation);
 
    DPRINT("PsGetCurrentProcess()->Win32WindowStation 0x%X\n",
           PsGetCurrentProcess()->Win32WindowStation);
index f9dd8cb..3bb33d6 100644 (file)
@@ -322,7 +322,6 @@ NtGdiTransparentBlt(
     SURFACE *BitmapDest, *BitmapSrc = NULL;
     HPALETTE SourcePalette = 0, DestPalette = 0;
     PPALETTE PalDestGDI, PalSourceGDI;
-    USHORT PalDestMode, PalSrcMode;
     ULONG TransparentColor = 0;
     BOOL Ret = FALSE;
     EXLATEOBJ exlo;
@@ -387,7 +386,6 @@ NtGdiTransparentBlt(
         SetLastWin32Error(ERROR_INVALID_HANDLE);
         goto done;
     }
-    PalSrcMode = PalSourceGDI->Mode;
     PALETTE_UnlockPalette(PalSourceGDI);
 
     if(DestPalette != SourcePalette)
@@ -397,12 +395,10 @@ NtGdiTransparentBlt(
             SetLastWin32Error(ERROR_INVALID_HANDLE);
             goto done;
         }
-        PalDestMode = PalDestGDI->Mode;
         PALETTE_UnlockPalette(PalDestGDI);
     }
     else
     {
-        PalDestMode = PalSrcMode;
         PalDestGDI = PalSourceGDI;
     }
 
index 9b445b1..1fa8535 100644 (file)
@@ -212,7 +212,6 @@ static
 VOID
 CopytoUserDcAttr(PDC dc, PDC_ATTR pdcattr)
 {
-  NTSTATUS Status = STATUS_SUCCESS;
   dc->dcattr.mxWorldToDevice = dc->dclevel.mxWorldToDevice;
   dc->dcattr.mxDeviceToWorld = dc->dclevel.mxDeviceToWorld;
   dc->dcattr.mxWorldToPage = dc->dclevel.mxWorldToPage;
@@ -228,7 +227,6 @@ CopytoUserDcAttr(PDC dc, PDC_ATTR pdcattr)
   }
   _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
   {
-     Status = _SEH2_GetExceptionCode();
      ASSERT(FALSE);
   }
   _SEH2_END;
index ffce431..659b9cb 100644 (file)
@@ -1256,10 +1256,8 @@ IntChangeDisplaySettings(
     IN DWORD dwflags,
     IN PVOID lParam  OPTIONAL)
 {
-    BOOLEAN Global = FALSE;
     BOOLEAN NoReset = FALSE;
     BOOLEAN Reset = FALSE;
-    BOOLEAN SetPrimary = FALSE;
     LONG Ret = DISP_CHANGE_SUCCESSFUL;
     NTSTATUS Status ;
 
@@ -1269,7 +1267,7 @@ IntChangeDisplaySettings(
     {
         /* Check global, reset and noreset flags */
         if ((dwflags & CDS_GLOBAL) == CDS_GLOBAL)
-            Global = TRUE;
+            DPRINT1("CDS_GLOBAL unhandled");
         if ((dwflags & CDS_NORESET) == CDS_NORESET)
             NoReset = TRUE;
         dwflags &= ~(CDS_GLOBAL | CDS_NORESET);
@@ -1277,7 +1275,7 @@ IntChangeDisplaySettings(
     if ((dwflags & CDS_RESET) == CDS_RESET)
         Reset = TRUE;
     if ((dwflags & CDS_SET_PRIMARY) == CDS_SET_PRIMARY)
-        SetPrimary = TRUE;
+        DPRINT1("CDS_SET_PRIMARY unhandled");
     dwflags &= ~(CDS_RESET | CDS_SET_PRIMARY);
 
     if (Reset && NoReset)
index 7475847..7b44fa3 100644 (file)
@@ -302,7 +302,9 @@ IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics)
     PSECTION_OBJECT SectionObject;
     ULONG ViewSize = 0;
     LARGE_INTEGER SectionSize;
+#if 0 // Wine code
     FT_Fixed XScale, YScale;
+#endif
     UNICODE_STRING FontRegPath = RTL_CONSTANT_STRING(L"\\REGISTRY\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts");
 
     /* Open the font file */
@@ -395,9 +397,9 @@ IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics)
     FontGDI->face = Face;
 
     /* FIXME: Complete text metrics */
+#if 0 /* This (Wine) code doesn't seem to work correctly for us */
     XScale = Face->size->metrics.x_scale;
     YScale = Face->size->metrics.y_scale;
-#if 0 /* This (Wine) code doesn't seem to work correctly for us */
     FontGDI->TextMetric.tmAscent =  (FT_MulFix(Face->ascender, YScale) + 32) >> 6;
     FontGDI->TextMetric.tmDescent = (FT_MulFix(Face->descender, YScale) + 32) >> 6;
     FontGDI->TextMetric.tmHeight =  (FT_MulFix(Face->ascender, YScale) -
index 11d3628..5a36725 100644 (file)
@@ -117,8 +117,7 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
      case GdiBCSelObj:
      {
         PGDIBSOBJECT pgO;
-        PTEXTOBJ pOrgFnt, pNewFnt = NULL;
-        HFONT hOrgFont = NULL;
+        PTEXTOBJ pNewFnt = NULL;
 
         if (!dc) break;
         pgO = (PGDIBSOBJECT) pHdr;
@@ -128,15 +127,6 @@ GdiFlushUserBatch(PDC dc, PGDIBATCHHDR pHdr)
            /* LFONTOBJ use share and locking. */
            pNewFnt = TEXTOBJ_LockText(pgO->hgdiobj);
 
-           pOrgFnt = dc->dclevel.plfnt;
-           if (pOrgFnt)
-           {
-              hOrgFont = pOrgFnt->BaseObject.hHmgr;
-           }
-           else
-           {
-              hOrgFont = pdcattr->hlfntNew;
-           }
            dc->dclevel.plfnt = pNewFnt;
            dc->hlfntCur = pgO->hgdiobj;
            pdcattr->hlfntNew = pgO->hgdiobj;
index e108b5c..a8f3b82 100644 (file)
@@ -693,7 +693,6 @@ IntGdiRealizePalette(HDC hDC)
   int realized = 0;
   PDC dc;
   HPALETTE systemPalette;
-  USHORT sysMode, palMode;
 
   dc = DC_LockDc(hDC);
   if (!dc) return 0;
@@ -731,8 +730,6 @@ IntGdiRealizePalette(HDC hDC)
   }
 
   // need to pass this to IntEngCreateXlate with palettes unlocked
-  sysMode = sysGDI->Mode;
-  palMode = palGDI->Mode;
   PALETTE_UnlockPalette(sysGDI);
   PALETTE_UnlockPalette(palGDI);
 
index 7d6c796..21ecb7c 100644 (file)
@@ -98,9 +98,9 @@ BOOL
 FASTCALL
 PATH_FillPath( PDC dc, PPATH pPath )
 {
-  INT   mapMode, graphicsMode;
-  SIZE  ptViewportExt, ptWindowExt;
-  POINTL ptViewportOrg, ptWindowOrg;
+  //INT   mapMode, graphicsMode;
+  //SIZE  ptViewportExt, ptWindowExt;
+  //POINTL ptViewportOrg, ptWindowOrg;
   XFORM xform;
   HRGN  hrgn;
   PDC_ATTR pdcattr = dc->pdcattr;
@@ -122,11 +122,11 @@ PATH_FillPath( PDC dc, PPATH pPath )
      */
 
     /* Save the information about the old mapping mode */
-    mapMode = pdcattr->iMapMode;
-    ptViewportExt = pdcattr->szlViewportExt;
-    ptViewportOrg = pdcattr->ptlViewportOrg;
-    ptWindowExt   = pdcattr->szlWindowExt;
-    ptWindowOrg   = pdcattr->ptlWindowOrg;
+    //mapMode = pdcattr->iMapMode;
+    //ptViewportExt = pdcattr->szlViewportExt;
+    //ptViewportOrg = pdcattr->ptlViewportOrg;
+    //ptWindowExt   = pdcattr->szlWindowExt;
+    //ptWindowOrg   = pdcattr->ptlWindowOrg;
 
     /* Save world transform
      * NB: The Windows documentation on world transforms would lead one to
@@ -143,7 +143,7 @@ PATH_FillPath( PDC dc, PPATH pPath )
 //    pdcattr->ptlWindowOrg.x = 0;
 //    pdcattr->ptlWindowOrg.y = 0;
 
-    graphicsMode = pdcattr->iGraphicsMode;
+   // graphicsMode = pdcattr->iGraphicsMode;
 //    pdcattr->iGraphicsMode = GM_ADVANCED;
 //    IntGdiModifyWorldTransform( dc, &xform, MWT_IDENTITY );
 //    pdcattr->iGraphicsMode =  graphicsMode;
@@ -159,7 +159,7 @@ PATH_FillPath( PDC dc, PPATH pPath )
 //    pdcattr->ptlWindowOrg   = ptWindowOrg;
 
     /* Go to GM_ADVANCED temporarily to restore the world transform */
-    graphicsMode = pdcattr->iGraphicsMode;
+    //graphicsMode = pdcattr->iGraphicsMode;
 //    pdcattr->iGraphicsMode = GM_ADVANCED;
 //    IntGdiModifyWorldTransform( dc, &xform, MWT_MAX+1 );
 //    pdcattr->iGraphicsMode = graphicsMode;
index c7c6c4a..03814d5 100644 (file)
@@ -2451,7 +2451,7 @@ IntGdiPaintRgn(
     REGION_FreeRgnByHandle(tmpVisRgn);
 
     // Fill the region
-    return TRUE;
+    return bRet;
 }
 
 BOOL
index a6cb9a3..ea0ab54 100644 (file)
@@ -836,9 +836,8 @@ CreatePrimitive(FILE *Out, unsigned Bpp, PROPINFO RopInfo)
         }
       if (ROPCODE_GENERIC == RopInfo->RopCode)
         {
-          Output(Out, "BOOLEAN UsesDest, UsesSource, UsesPattern;\n");
+          Output(Out, "BOOLEAN UsesSource, UsesPattern;\n");
           Output(Out, "\n");
-          Output(Out, "UsesDest = ROP4_USES_DEST(BltInfo->Rop4);\n");
           Output(Out, "UsesSource = ROP4_USES_SOURCE(BltInfo->Rop4);\n");
           Output(Out, "UsesPattern = ROP4_USES_PATTERN(BltInfo->Rop4);\n");
         }