[PATCH v3 0/1] MR872: winex11: Always initialize escape.drawable in X11DRV_GetDC().
-- v3: winex11: Always initialize escape.drawable in X11DRV_GetDC(). https://gitlab.winehq.org/wine/wine/-/merge_requests/872
From: Zebediah Figura <zfigura(a)codeweavers.com> --- dlls/winex11.drv/window.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 70a29d24fb1..8620ce1ec55 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -26,6 +26,7 @@ #include "config.h" +#include <assert.h> #include <stdarg.h> #include <stdlib.h> #include <stdio.h> @@ -2297,6 +2298,8 @@ void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, struct x11drv_escape_set_drawable escape; HWND parent; + assert( hwnd ); + escape.code = X11DRV_SET_DRAWABLE; escape.mode = IncludeInferiors; @@ -2317,6 +2320,10 @@ void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, } else { + /* gcc detects that "escape.drawable" may be used uninitialized if + * "hwnd" is NULL */ + escape.drawable = 0; + /* find the first ancestor that has a drawable */ for (parent = hwnd; parent && parent != top; parent = NtUserGetAncestor( parent, GA_PARENT )) if ((escape.drawable = X11DRV_get_whole_window( parent ))) break; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/872
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=125231 Your paranoid android. === debian11 (build log) === Task: Could not create the win32 wineprefix: Failed to disable the crash dialogs: Task: WineTest did not produce the win32 report
This merge request was closed by Zebediah Figura. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/872
participants (3)
-
Marvin -
Zebediah Figura -
Zebediah Figura (@zfigura)