From b93c614176dedb25f0dcd58b02c67578acce6dc3 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 14 Feb 2024 13:45:45 +0100 Subject: [PATCH] xwin: fix unused variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../hw/xwin/winmultiwindowwndproc.c:418:17: warning: unused variable ‘ps’ [-Wunused-variable] 744 418 | PAINTSTRUCT ps; 745 | ^~ ../hw/xwin/InitOutput.c:114:13: warning: ‘noDriExtension’ defined but not used [-Wunused-variable] 752 114 | static Bool noDriExtension; 753 | ^~~~~~~~~~~~~~ 375/383] Compiling C object hw/xwin/Xming.exe.p/winprefs.c.obj 799../hw/xwin/winprefs.c: In function ‘LoadImageComma’: 800../hw/xwin/winprefs.c:545:14: warning: unused variable ‘convert’ [-Wunused-variable] 801 545 | Bool convert = FALSE; 802 | ^~~~~~~ Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xwin/InitOutput.c | 4 ++++ hw/xwin/winmultiwindowwndproc.c | 2 +- hw/xwin/winprefs.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 7a03bfb91..b72cc71a5 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -111,7 +111,11 @@ static PixmapFormatRec g_PixmapFormats[] = { {32, 32, BITMAP_SCANLINE_PAD} }; +#ifdef GLXEXT +#ifdef XWIN_WINDOWS_DRI static Bool noDriExtension; +#endif +#endif static const ExtensionModule xwinExtensions[] = { #ifdef GLXEXT diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index 31b5d6307..dcb21758a 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -415,7 +415,6 @@ LRESULT CALLBACK winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { POINT ptMouse; - PAINTSTRUCT ps; WindowPtr pWin = NULL; winPrivWinPtr pWinPriv = NULL; ScreenPtr s_pScreen = NULL; @@ -578,6 +577,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) #ifdef XWIN_GLX_WINDOWS if (pWinPriv->fWglUsed) { + PAINTSTRUCT ps; /* For regions which are being drawn by GL, the shadow framebuffer doesn't have the correct bits, so don't bitblt from the shadow framebuffer diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c index d0b2ef2e7..8cf45fd51 100644 --- a/hw/xwin/winprefs.c +++ b/hw/xwin/winprefs.c @@ -542,7 +542,9 @@ LoadImageComma(char *fname, char *iconDirectory, int sx, int sy, int flags) } else { char *file = malloc(PATH_MAX + NAME_MAX + 2); +#ifdef __CYGWIN__ Bool convert = FALSE; +#endif if (!file) return NULL;