user32: Remove unused variables
Andrew Talbot
andrew.talbot at talbotville.com
Tue Apr 29 15:23:57 CDT 2008
Changelog:
user32: Remove unused variables.
diff --git a/dlls/user32/caret.c b/dlls/user32/caret.c
index 8487f0c..8ff8da2 100644
--- a/dlls/user32/caret.c
+++ b/dlls/user32/caret.c
@@ -77,7 +77,6 @@ static void CALLBACK CARET_Callback( HWND hwnd, UINT msg, UINT_PTR id, DWORD cti
{
BOOL ret;
RECT r;
- int old_state = 0;
int hidden = 0;
SERVER_START_REQ( set_caret_info )
@@ -95,7 +94,6 @@ static void CALLBACK CARET_Callback( HWND hwnd, UINT msg, UINT_PTR id, DWORD cti
r.top = reply->old_rect.top;
r.right = reply->old_rect.right;
r.bottom = reply->old_rect.bottom;
- old_state = reply->old_state;
hidden = reply->old_hide;
}
}
@@ -332,7 +330,6 @@ BOOL WINAPI ShowCaret( HWND hwnd )
{
BOOL ret;
RECT r;
- int old_state = 0;
int hidden = 0;
SERVER_START_REQ( set_caret_info )
@@ -350,7 +347,6 @@ BOOL WINAPI ShowCaret( HWND hwnd )
r.top = reply->old_rect.top;
r.right = reply->old_rect.right;
r.bottom = reply->old_rect.bottom;
- old_state = reply->old_state;
hidden = reply->old_hide;
}
}
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 153a2a4..5dbc1b9 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -384,11 +384,10 @@ static ICONCACHE* CURSORICON_FindCache(HICON hIcon)
ICONCACHE *ptr;
ICONCACHE *pRet=NULL;
BOOL IsFound = FALSE;
- int count;
EnterCriticalSection( &IconCrst );
- for (count = 0, ptr = IconAnchor; ptr != NULL && !IsFound; ptr = ptr->next, count++ )
+ for (ptr = IconAnchor; ptr != NULL && !IsFound; ptr = ptr->next)
{
if ( hIcon == ptr->hIcon )
{
diff --git a/dlls/user32/dde_server.c b/dlls/user32/dde_server.c
index a1c2425..a2064a0 100644
--- a/dlls/user32/dde_server.c
+++ b/dlls/user32/dde_server.c
@@ -165,12 +165,9 @@ HDDEDATA WINAPI DdeNameService(DWORD idInst, HSZ hsz1, HSZ hsz2, UINT afCmd)
{
WDML_SERVER* pServer;
WDML_INSTANCE* pInstance;
- HDDEDATA hDdeData;
HWND hwndServer;
WNDCLASSEXW wndclass;
- hDdeData = NULL;
-
TRACE("(%d,%p,%p,%x)\n", idInst, hsz1, hsz2, afCmd);
/* First check instance
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index b58dc96..b37b5dc 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -3424,7 +3424,6 @@ static void EDIT_EM_ScrollCaret(EDITSTATE *es)
{
if (es->style & ES_MULTILINE) {
INT l;
- INT li;
INT vlc;
INT ww;
INT cw = es->char_width;
@@ -3433,7 +3432,6 @@ static void EDIT_EM_ScrollCaret(EDITSTATE *es)
INT dx = 0;
l = EDIT_EM_LineFromChar(es, es->selection_end);
- li = EDIT_EM_LineIndex(es, l);
x = (short)LOWORD(EDIT_EM_PosFromChar(es, es->selection_end, es->flags & EF_AFTER_WRAP));
vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height;
if (l >= es->y_offset + vlc)
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 7a14d87..49de5e1 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -679,11 +679,10 @@ MENU_AdjustMenuItemRect(const POPUPMENU *menu, LPRECT rect)
{
if (menu->bScrolling)
{
- UINT arrow_bitmap_width, arrow_bitmap_height;
+ UINT arrow_bitmap_height;
BITMAP bmp;
GetObjectW(get_up_arrow_bitmap(), sizeof(bmp), &bmp);
- arrow_bitmap_width = bmp.bmWidth;
arrow_bitmap_height = bmp.bmHeight;
rect->top += arrow_bitmap_height - menu->nScrollPos;
rect->bottom += arrow_bitmap_height - menu->nScrollPos;
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 7f1b68b..542298a 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -2226,7 +2226,7 @@ static void wait_message_reply( UINT flags )
for (;;)
{
- unsigned int wake_bits = 0, changed_bits = 0;
+ unsigned int wake_bits = 0;
DWORD dwlc, res;
SERVER_START_REQ( set_queue_mask )
@@ -2235,10 +2235,7 @@ static void wait_message_reply( UINT flags )
req->changed_mask = req->wake_mask;
req->skip_wait = 1;
if (!wine_server_call( req ))
- {
- wake_bits = reply->wake_bits;
- changed_bits = reply->changed_bits;
- }
+ wake_bits = reply->wake_bits;
}
SERVER_END_REQ;
diff --git a/dlls/user32/user16.c b/dlls/user32/user16.c
index b55c8ed..64a160f 100644
--- a/dlls/user32/user16.c
+++ b/dlls/user32/user16.c
@@ -951,11 +951,9 @@ WORD WINAPI GetFreeSystemResources16( WORD resType )
STACK16FRAME* stack16 = MapSL((SEGPTR)NtCurrentTeb()->WOW32Reserved);
HANDLE16 oldDS = stack16->ds;
HINSTANCE16 gdi_inst;
- WORD gdi_heap;
int userPercent, gdiPercent;
if ((gdi_inst = LoadLibrary16( "GDI" )) < 32) return 0;
- gdi_heap = gdi_inst | 7;
switch(resType)
{
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 78749a9..b325384 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -1867,7 +1867,6 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
WND *win;
BOOL ret;
RECT visible_rect, old_window_rect;
- DWORD new_style;
if (!(win = WIN_GetPtr( hwnd ))) return FALSE;
if (win == WND_DESKTOP || win == WND_OTHER_PROCESS) return FALSE;
@@ -1901,7 +1900,6 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
}
}
SERVER_END_REQ;
- new_style = win->dwStyle;
WIN_ReleasePtr( win );
if (ret)
More information about the wine-patches
mailing list