[Desk|User32|UXTheme]
authorDmitry Gorbachev <gorbachev@reactos.org>
Thu, 22 Sep 2011 06:09:11 +0000 (06:09 +0000)
committerDmitry Gorbachev <gorbachev@reactos.org>
Thu, 22 Sep 2011 06:09:11 +0000 (06:09 +0000)
Silence GCC 4.6 "variable 'foo' set but not used [-Werror=unused-but-set-variable]" warnings/errors.

svn path=/trunk/; revision=53800

reactos/dll/cpl/desk/advmon.c
reactos/dll/cpl/desk/appearance.c
reactos/dll/cpl/desk/draw.c
reactos/dll/cpl/desk/monslctl.c
reactos/dll/win32/user32/windows/hook.c
reactos/dll/win32/uxtheme/draw.c
reactos/dll/win32/uxtheme/nonclient.c

index aba9b9a..36465fe 100644 (file)
@@ -88,11 +88,8 @@ DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY DisplayDevice)
     IDataObject *pdo;
 #ifdef _MSC_VER
     HMODULE hShell32 = NULL;
-#endif
     CPSEAE msvc_SHCreatePropSheetExtArrayEx;
-
-    /* silence gcc warning */
-    msvc_SHCreatePropSheetExtArrayEx = NULL;
+#endif
 
     /* FIXME: Build the "%s and %s" caption string for the monitor and adapter name */
     szCaption[0] = _T('\0');
index 5c1910c..0785623 100644 (file)
@@ -53,7 +53,7 @@ AppearancePage_ShowColorScemes(GLOBALS *g, HWND hwndColor, INT ThemeId)
 static INT_PTR
 AppearancePage_OnInit(HWND hwndDlg)
 {
-       INT i, TemplateCount, iListIndex;
+       INT i, /*TemplateCount,*/ iListIndex;
        HWND hwndColor, hwndTheme;
        GLOBALS *g;
 
@@ -74,7 +74,7 @@ AppearancePage_OnInit(HWND hwndDlg)
 
        LoadThemes(g);
 
-       TemplateCount = LoadSchemePresetEntries(g->strSelectedStyle);
+       /*TemplateCount = */ LoadSchemePresetEntries(g->strSelectedStyle);
 
        hwndColor = GetDlgItem(hwndDlg, IDC_APPEARANCE_COLORSCHEME);
        g->SchemeId = -1;
index 04bc7c6..a6bf08a 100644 (file)
@@ -437,18 +437,18 @@ MyDrawScrollbar(HDC hdc, LPRECT rc, HBRUSH hbrScrollbar, COLOR_SCHEME *scheme)
 BOOL
 MyDrawCaptionTemp(HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont, HICON hIcon, LPCWSTR str, UINT uFlags, COLOR_SCHEME *scheme)
 {
-       ULONG Height;
-       UINT VCenter, Padding;
-       LONG ButtonWidth;
+       //ULONG Height;
+       //UINT VCenter, Padding;
+       //LONG ButtonWidth;
        HBRUSH hbr;
        HGDIOBJ hFontOld;
-    RECT rc;
+       RECT rc;
 
-       Height = scheme->Size[SIZE_CAPTION_Y] - 1;
-       VCenter = (rect->bottom - rect->top) / 2;
-       Padding = VCenter - (Height / 2);
+       //Height = scheme->Size[SIZE_CAPTION_Y] - 1;
+       //VCenter = (rect->bottom - rect->top) / 2;
+       //Padding = VCenter - (Height / 2);
 
-       ButtonWidth = scheme->Size[SIZE_SIZE_X] - 2;
+       //ButtonWidth = scheme->Size[SIZE_SIZE_X] - 2;
 
        if (uFlags & DC_GRADIENT)
        {
index 0a15cf8..37c61a2 100644 (file)
@@ -684,7 +684,7 @@ MonSelGetMonitorFont(IN OUT PMONITORSELWND infoPtr,
     SIZE rcsize;
     LOGFONT lf;
     HFONT hPrevFont, hFont;
-    INT len;
+    //INT len;
 
     hFont = infoPtr->Monitors[Index].hFont;
     if (hFont == NULL &&
@@ -698,7 +698,7 @@ MonSelGetMonitorFont(IN OUT PMONITORSELWND infoPtr,
                     (2 * infoPtr->SelectionFrame.cy) - 2;
         rcsize.cy = (rcsize.cy * 60) / 100;
 
-        len = _tcslen(infoPtr->Monitors[Index].szCaption);
+        //len = _tcslen(infoPtr->Monitors[Index].szCaption);
 
         hPrevFont = SelectObject(hDC,
                                  infoPtr->hFont);
index 97c74f0..31805e9 100644 (file)
@@ -434,7 +434,7 @@ HINSTANCE ClientLoadLibrary(PUNICODE_STRING pstrLibName,
 {
     HINSTANCE hLibrary;
     PVOID pInitFunction;
-    NTSTATUS Status;
+    //NTSTATUS Status;
     ANSI_STRING InitFuncName;
     BOOL Result = FALSE;
 
@@ -467,7 +467,7 @@ HINSTANCE ClientLoadLibrary(PUNICODE_STRING pstrLibName,
         /* Initialize the user api hook */
         ASSERT(pstrInitFunc->Buffer);
 
-        Status = RtlUnicodeStringToAnsiString(&InitFuncName, 
+        /*Status = */ RtlUnicodeStringToAnsiString(&InitFuncName, 
                                               pstrInitFunc,
                                               TRUE);
 
index 1459563..7268d77 100644 (file)
@@ -1756,8 +1756,8 @@ static HBITMAP UXTHEME_DrawThemePartToDib(HTHEME hTheme, HDC hdc, int iPartId, i
 static HRGN UXTHEME_RegionFromDibBits(RGBQUAD* pBuffer, RGBQUAD* pclrTransparent, LPCRECT pRect)
 {
     int x, y, xstart;
-    int cMaxRgnRects, cRgnDataSize, cRgnRects;
 #ifdef EXTCREATEREGION_WORKS
+    int cMaxRgnRects, cRgnDataSize, cRgnRects;
     RECT* prcCurrent;
     PRGNDATA prgnData;
 #else
@@ -1769,12 +1769,12 @@ static HRGN UXTHEME_RegionFromDibBits(RGBQUAD* pBuffer, RGBQUAD* pclrTransparent
     pclrCurrent = (PULONG)pBuffer;
     clrTransparent = *(PULONG)pclrTransparent;
 
+#ifdef EXTCREATEREGION_WORKS
     /* Create a region and pre-allocate memory enough for 3 spaces in one row*/
     cRgnRects = 0;
     cMaxRgnRects = 4* (pRect->bottom-pRect->top);
     cRgnDataSize = sizeof(RGNDATA) + cMaxRgnRects * sizeof(RECT);
 
-#ifdef EXTCREATEREGION_WORKS
     /* Allocate the region data */
     prgnData = (PRGNDATA)HeapAlloc(GetProcessHeap(), 0, cRgnDataSize);
 
index 98008c4..c13e310 100644 (file)
@@ -736,7 +736,7 @@ static VOID
 ThemeHandleButton(HWND hWnd, WPARAM wParam)
 {
     MSG Msg;
-    BOOL Pressed = TRUE, OldState;
+    BOOL Pressed = TRUE; // , OldState;
     WPARAM SCMsg, ht;
     ULONG Style;
     DRAW_CONTEXT context;
@@ -779,7 +779,7 @@ ThemeHandleButton(HWND hWnd, WPARAM wParam)
         if (Msg.message != WM_MOUSEMOVE)
             continue;
 
-        OldState = Pressed;
+        //OldState = Pressed;
         ht = SendMessage(hWnd, WM_NCHITTEST, 0, MAKELPARAM(Msg.pt.x, Msg.pt.y));
         Pressed = (ht == wParam);