From 5156219a1c966a3459519f74ba15aa0838a07c4d Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Fri, 2 May 2008 12:50:13 +0100 Subject: [PATCH] winex11.drv: Remove unused variables. --- dlls/winex11.drv/dib.c | 3 --- dlls/winex11.drv/dib_dst_swap.c | 4 ---- dlls/winex11.drv/event.c | 2 -- dlls/winex11.drv/mouse.c | 6 ++---- dlls/winex11.drv/opengl.c | 2 -- dlls/winex11.drv/systray.c | 3 +-- dlls/winex11.drv/window.c | 7 +------ dlls/winex11.drv/xfont.c | 2 -- 8 files changed, 4 insertions(+), 25 deletions(-) diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index 81345a9eed8..4b287eaac23 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -2899,7 +2899,6 @@ static void X11DRV_DIB_SetImageBits_32(int lines, const BYTE *srcbits, DWORD linebytes) { DWORD x; - const DWORD *ptr; int h, width = min(srcwidth, dstwidth); const dib_conversions *convs = (bmpImage->byte_order == LSBFirst) ? &dib_normal : &dib_dst_byteswap; @@ -2910,8 +2909,6 @@ static void X11DRV_DIB_SetImageBits_32(int lines, const BYTE *srcbits, linebytes = -linebytes; } - ptr = (const DWORD *) srcbits + left; - switch (bmpImage->depth) { case 24: diff --git a/dlls/winex11.drv/dib_dst_swap.c b/dlls/winex11.drv/dib_dst_swap.c index 66b77e6e339..cf0aa413feb 100644 --- a/dlls/winex11.drv/dib_dst_swap.c +++ b/dlls/winex11.drv/dib_dst_swap.c @@ -1369,9 +1369,7 @@ static void convert_0888_to_888_asis_dst_byteswap(int width, int height, const DWORD* srcpixel; DWORD* dstpixel; int x,y; - int oddwidth; - oddwidth=width & 3; width=width/4; for (y=0; ynWidth * ptr->nHeight / 8; and_ptr = and_bits = (unsigned char *)(ptr + 1); - xor_size = xor_width_bytes * ptr->nHeight; xor_ptr = xor_bits = and_ptr + and_size; image = pXcursorImageCreate( xmax, ymax ); @@ -664,7 +663,7 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr ) int rbits, gbits, bbits, red, green, blue; int rfg, gfg, bfg, rbg, gbg, bbg; int rscale, gscale, bscale; - int x, y, xmax, ymax, bitIndex, byteIndex, xorIndex; + int x, y, xmax, ymax, byteIndex, xorIndex; unsigned char *theMask, *theImage, theChar; int threshold, fgBits, bgBits, bitShifted; BYTE pXorBits[128]; /* Up to 32x32 icons */ @@ -703,7 +702,6 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr ) */ theImage = &theMask[ptr->nWidth/8 * ptr->nHeight]; rfg = gfg = bfg = rbg = gbg = bbg = 0; - bitIndex = 0; byteIndex = 0; xorIndex = 0; fgBits = 0; diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index dbe66f19c9c..f92f94376fe 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1047,7 +1047,6 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev, int bestDepth = -1; int bestStencil = -1; int bestAux = -1; - int score; if (!has_opengl()) { ERR("No libGL on this box - disabling OpenGL support !\n"); @@ -1069,7 +1068,6 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev, int alpha=0, color=0, depth=0, stencil=0, aux=0; fmt = ConvertPixelFormatWGLtoGLX(gdi_display, i+1 /* 1-based index */, FALSE /* offscreen */, &value); - score = 0; /* Pixel type */ pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_RENDER_TYPE, &value); diff --git a/dlls/winex11.drv/systray.c b/dlls/winex11.drv/systray.c index a6cf182eefd..d2a07fc33f1 100644 --- a/dlls/winex11.drv/systray.c +++ b/dlls/winex11.drv/systray.c @@ -419,12 +419,11 @@ BOOL wine_notify_icon( DWORD msg, NOTIFYICONDATAW *data ) { BOOL ret = FALSE; struct tray_icon *icon; - Window owner; switch (msg) { case NIM_ADD: - if ((owner = get_systray_selection_owner( thread_display() ))) ret = add_icon( data ); + if (get_systray_selection_owner( thread_display() )) ret = add_icon( data ); break; case NIM_DELETE: if ((icon = get_icon( data->hWnd, data->uID ))) ret = delete_icon( icon ); diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index f4eb82e8697..0b20338910b 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1564,12 +1564,8 @@ static struct x11drv_win_data *alloc_win_data( Display *display, HWND hwnd ) static struct x11drv_win_data *create_desktop_win_data( Display *display, HWND hwnd ) { struct x11drv_win_data *data; - VisualID visualid; if (!(data = alloc_win_data( display, hwnd ))) return NULL; - wine_tsx11_lock(); - visualid = XVisualIDFromVisual(visual); - wine_tsx11_unlock(); data->whole_window = data->client_window = root_window; data->managed = TRUE; SetPropA( data->hwnd, managed_prop, (HANDLE)1 ); @@ -1926,7 +1922,7 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags, Display *display = thread_data->display; struct x11drv_win_data *data = X11DRV_get_win_data( hwnd ); DWORD new_style = GetWindowLongW( hwnd, GWL_STYLE ); - RECT old_window_rect, old_whole_rect, old_client_rect; + RECT old_whole_rect, old_client_rect; int event_type; if (!data) @@ -1945,7 +1941,6 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags, SetPropA( hwnd, managed_prop, (HANDLE)1 ); } - old_window_rect = data->window_rect; old_whole_rect = data->whole_rect; old_client_rect = data->client_rect; data->window_rect = *rectWindow; diff --git a/dlls/winex11.drv/xfont.c b/dlls/winex11.drv/xfont.c index 8ab323d425a..6d8ff78938f 100644 --- a/dlls/winex11.drv/xfont.c +++ b/dlls/winex11.drv/xfont.c @@ -1366,7 +1366,6 @@ static void XFONT_WindowsNames(void) for( fr = fontList; fr ; fr = fr->next ) { fontResource* pfr; - char* lpch; if( fr->fr_flags & FR_NAMESET ) continue; /* skip already assigned */ @@ -1377,7 +1376,6 @@ static void XFONT_WindowsNames(void) break; } - lpch = fr->lfFaceName; snprintf( fr->lfFaceName, sizeof(fr->lfFaceName), "%s %s", /* prepend vendor name */ (pfr==fr) ? "" : fr->resource->foundry,