From b0e67ed0fbe68004c38ab6532ae2e119799d6b5d Mon Sep 17 00:00:00 2001 From: Sir Richard Date: Mon, 6 Sep 2010 23:55:53 +0000 Subject: [PATCH] [WIN32K]: Fix large amount of set-but-unused variables. Most of these seemed to be old/unfinished code, however in IntGdiPaintRgn an actual bug seems to have been found. [WIN32K]: Make IntGdiPaintRgn return the status of the operation, not always TRUE. svn path=/trunk/; revision=48712 --- reactos/subsystems/win32/win32k/dib/dib1bpp.c | 3 --- reactos/subsystems/win32/win32k/dib/dib8bpp.c | 3 +-- reactos/subsystems/win32/win32k/eng/bitblt.c | 2 -- reactos/subsystems/win32/win32k/eng/paint.c | 2 -- .../subsystems/win32/win32k/ntuser/class.c | 8 +------- .../win32/win32k/ntuser/clipboard.c | 5 ++--- .../win32/win32k/ntuser/cursoricon.c | 15 +++++++------- .../subsystems/win32/win32k/ntuser/event.c | 14 ++++++------- .../subsystems/win32/win32k/ntuser/input.c | 2 -- .../subsystems/win32/win32k/ntuser/keyboard.c | 3 --- reactos/subsystems/win32/win32k/ntuser/menu.c | 2 -- .../subsystems/win32/win32k/ntuser/message.c | 6 ------ .../subsystems/win32/win32k/ntuser/ntuser.c | 4 +--- .../subsystems/win32/win32k/ntuser/painting.c | 7 ++----- reactos/subsystems/win32/win32k/ntuser/prop.c | 2 -- .../win32/win32k/ntuser/scrollbar.c | 7 +++---- .../win32/win32k/ntuser/simplecall.c | 3 --- .../subsystems/win32/win32k/ntuser/window.c | 11 +++------- .../subsystems/win32/win32k/ntuser/winsta.c | 3 +-- .../subsystems/win32/win32k/objects/bitblt.c | 4 ---- .../subsystems/win32/win32k/objects/dcattr.c | 2 -- .../subsystems/win32/win32k/objects/device.c | 6 ++---- .../win32/win32k/objects/freetype.c | 4 +++- .../win32/win32k/objects/gdibatch.c | 12 +---------- .../subsystems/win32/win32k/objects/palette.c | 3 --- .../subsystems/win32/win32k/objects/path.c | 20 +++++++++---------- .../subsystems/win32/win32k/objects/region.c | 2 +- reactos/tools/gendib/gendib.c | 3 +-- 28 files changed, 46 insertions(+), 112 deletions(-) diff --git a/reactos/subsystems/win32/win32k/dib/dib1bpp.c b/reactos/subsystems/win32/win32k/dib/dib1bpp.c index ebea73d3326..3686754e5dd 100644 --- a/reactos/subsystems/win32/win32k/dib/dib1bpp.c +++ b/reactos/subsystems/win32/win32k/dib/dib1bpp.c @@ -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 ) { diff --git a/reactos/subsystems/win32/win32k/dib/dib8bpp.c b/reactos/subsystems/win32/win32k/dib/dib8bpp.c index 95b09cbb73c..3fac604f5c4 100644 --- a/reactos/subsystems/win32/win32k/dib/dib8bpp.c +++ b/reactos/subsystems/win32/win32k/dib/dib8bpp.c @@ -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++) { diff --git a/reactos/subsystems/win32/win32k/eng/bitblt.c b/reactos/subsystems/win32/win32k/eng/bitblt.c index 8806aa75fc5..b74e890cfd0 100644 --- a/reactos/subsystems/win32/win32k/eng/bitblt.c +++ b/reactos/subsystems/win32/win32k/eng/bitblt.c @@ -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 */ diff --git a/reactos/subsystems/win32/win32k/eng/paint.c b/reactos/subsystems/win32/win32k/eng/paint.c index 29cd723d4b0..d1290b3e9e9 100644 --- a/reactos/subsystems/win32/win32k/eng/paint.c +++ b/reactos/subsystems/win32/win32k/eng/paint.c @@ -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); diff --git a/reactos/subsystems/win32/win32k/ntuser/class.c b/reactos/subsystems/win32/win32k/ntuser/class.c index aa06be34140..ac6a5b708ca 100644 --- a/reactos/subsystems/win32/win32k/ntuser/class.c +++ b/reactos/subsystems/win32/win32k/ntuser/class.c @@ -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; diff --git a/reactos/subsystems/win32/win32k/ntuser/clipboard.c b/reactos/subsystems/win32/win32k/ntuser/clipboard.c index 0448f6c17d6..81a766709f5 100644 --- a/reactos/subsystems/win32/win32k/ntuser/clipboard.c +++ b/reactos/subsystems/win32/win32k/ntuser/clipboard.c @@ -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); diff --git a/reactos/subsystems/win32/win32k/ntuser/cursoricon.c b/reactos/subsystems/win32/win32k/ntuser/cursoricon.c index ff349c8459f..f439c772c59 100644 --- a/reactos/subsystems/win32/win32k/ntuser/cursoricon.c +++ b/reactos/subsystems/win32/win32k/ntuser/cursoricon.c @@ -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); } diff --git a/reactos/subsystems/win32/win32k/ntuser/event.c b/reactos/subsystems/win32/win32k/ntuser/event.c index d170983d088..3f0d36801df 100644 --- a/reactos/subsystems/win32/win32k/ntuser/event.c +++ b/reactos/subsystems/win32/win32k/ntuser/event.c @@ -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, diff --git a/reactos/subsystems/win32/win32k/ntuser/input.c b/reactos/subsystems/win32/win32k/ntuser/input.c index 8764e19d877..c88b08aaae2 100644 --- a/reactos/subsystems/win32/win32k/ntuser/input.c +++ b/reactos/subsystems/win32/win32k/ntuser/input.c @@ -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; diff --git a/reactos/subsystems/win32/win32k/ntuser/keyboard.c b/reactos/subsystems/win32/win32k/ntuser/keyboard.c index 70e905490a6..62b2d7d9042 100644 --- a/reactos/subsystems/win32/win32k/ntuser/keyboard.c +++ b/reactos/subsystems/win32/win32k/ntuser/keyboard.c @@ -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 ); diff --git a/reactos/subsystems/win32/win32k/ntuser/menu.c b/reactos/subsystems/win32/win32k/ntuser/menu.c index 4da4922419d..0e32359ad2f 100644 --- a/reactos/subsystems/win32/win32k/ntuser/menu.c +++ b/reactos/subsystems/win32/win32k/ntuser/menu.c @@ -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; diff --git a/reactos/subsystems/win32/win32k/ntuser/message.c b/reactos/subsystems/win32/win32k/ntuser/message.c index b6ed7e5d1aa..1d7a0b34171 100644 --- a/reactos/subsystems/win32/win32k/ntuser/message.c +++ b/reactos/subsystems/win32/win32k/ntuser/message.c @@ -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, diff --git a/reactos/subsystems/win32/win32k/ntuser/ntuser.c b/reactos/subsystems/win32/win32k/ntuser/ntuser.c index b8f17849195..14857b09f25 100644 --- a/reactos/subsystems/win32/win32k/ntuser/ntuser.c +++ b/reactos/subsystems/win32/win32k/ntuser/ntuser.c @@ -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. diff --git a/reactos/subsystems/win32/win32k/ntuser/painting.c b/reactos/subsystems/win32/win32k/ntuser/painting.c index 7aba2547a34..d847021ca4f 100644 --- a/reactos/subsystems/win32/win32k/ntuser/painting.c +++ b/reactos/subsystems/win32/win32k/ntuser/painting.c @@ -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; diff --git a/reactos/subsystems/win32/win32k/ntuser/prop.c b/reactos/subsystems/win32/win32k/ntuser/prop.c index c596c0e02a5..5e032a60e84 100644 --- a/reactos/subsystems/win32/win32k/ntuser/prop.c +++ b/reactos/subsystems/win32/win32k/ntuser/prop.c @@ -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--; diff --git a/reactos/subsystems/win32/win32k/ntuser/scrollbar.c b/reactos/subsystems/win32/win32k/ntuser/scrollbar.c index 8efd8721d76..787a0e3a87e 100644 --- a/reactos/subsystems/win32/win32k/ntuser/scrollbar.c +++ b/reactos/subsystems/win32/win32k/ntuser/scrollbar.c @@ -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++) { diff --git a/reactos/subsystems/win32/win32k/ntuser/simplecall.c b/reactos/subsystems/win32/win32k/ntuser/simplecall.c index bf26bc27962..7c4d2226354 100644 --- a/reactos/subsystems/win32/win32k/ntuser/simplecall.c +++ b/reactos/subsystems/win32/win32k/ntuser/simplecall.c @@ -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: diff --git a/reactos/subsystems/win32/win32k/ntuser/window.c b/reactos/subsystems/win32/win32k/ntuser/window.c index 5379fcbc3ed..5c71931c5a1 100644 --- a/reactos/subsystems/win32/win32k/ntuser/window.c +++ b/reactos/subsystems/win32/win32k/ntuser/window.c @@ -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) { diff --git a/reactos/subsystems/win32/win32k/ntuser/winsta.c b/reactos/subsystems/win32/win32k/ntuser/winsta.c index c4714c7af58..09810d2c82a 100644 --- a/reactos/subsystems/win32/win32k/ntuser/winsta.c +++ b/reactos/subsystems/win32/win32k/ntuser/winsta.c @@ -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); diff --git a/reactos/subsystems/win32/win32k/objects/bitblt.c b/reactos/subsystems/win32/win32k/objects/bitblt.c index f9dd8cb431d..3bb33d6bbac 100644 --- a/reactos/subsystems/win32/win32k/objects/bitblt.c +++ b/reactos/subsystems/win32/win32k/objects/bitblt.c @@ -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; } diff --git a/reactos/subsystems/win32/win32k/objects/dcattr.c b/reactos/subsystems/win32/win32k/objects/dcattr.c index 9b445b1490c..1fa8535d9cc 100644 --- a/reactos/subsystems/win32/win32k/objects/dcattr.c +++ b/reactos/subsystems/win32/win32k/objects/dcattr.c @@ -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; diff --git a/reactos/subsystems/win32/win32k/objects/device.c b/reactos/subsystems/win32/win32k/objects/device.c index ffce4311373..659b9cb4f95 100644 --- a/reactos/subsystems/win32/win32k/objects/device.c +++ b/reactos/subsystems/win32/win32k/objects/device.c @@ -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) diff --git a/reactos/subsystems/win32/win32k/objects/freetype.c b/reactos/subsystems/win32/win32k/objects/freetype.c index 7475847d234..7b44fa384d7 100644 --- a/reactos/subsystems/win32/win32k/objects/freetype.c +++ b/reactos/subsystems/win32/win32k/objects/freetype.c @@ -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) - diff --git a/reactos/subsystems/win32/win32k/objects/gdibatch.c b/reactos/subsystems/win32/win32k/objects/gdibatch.c index 11d3628b67d..5a367250409 100644 --- a/reactos/subsystems/win32/win32k/objects/gdibatch.c +++ b/reactos/subsystems/win32/win32k/objects/gdibatch.c @@ -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; diff --git a/reactos/subsystems/win32/win32k/objects/palette.c b/reactos/subsystems/win32/win32k/objects/palette.c index e108b5c6885..a8f3b829bba 100644 --- a/reactos/subsystems/win32/win32k/objects/palette.c +++ b/reactos/subsystems/win32/win32k/objects/palette.c @@ -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); diff --git a/reactos/subsystems/win32/win32k/objects/path.c b/reactos/subsystems/win32/win32k/objects/path.c index 7d6c796bdce..21ecb7c442b 100644 --- a/reactos/subsystems/win32/win32k/objects/path.c +++ b/reactos/subsystems/win32/win32k/objects/path.c @@ -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; diff --git a/reactos/subsystems/win32/win32k/objects/region.c b/reactos/subsystems/win32/win32k/objects/region.c index c7c6c4ae312..03814d5db60 100644 --- a/reactos/subsystems/win32/win32k/objects/region.c +++ b/reactos/subsystems/win32/win32k/objects/region.c @@ -2451,7 +2451,7 @@ IntGdiPaintRgn( REGION_FreeRgnByHandle(tmpVisRgn); // Fill the region - return TRUE; + return bRet; } BOOL diff --git a/reactos/tools/gendib/gendib.c b/reactos/tools/gendib/gendib.c index a6cb9a3626e..ea0ab54f8cb 100644 --- a/reactos/tools/gendib/gendib.c +++ b/reactos/tools/gendib/gendib.c @@ -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"); } -- 2.17.1