[PATCH xserver 2/4] hw/xwin: Fix -Wmaybe-uninitialized warning in winWindowProc
Adam Jackson
ajax at nwnk.net
Tue Apr 18 21:08:39 UTC 2017
On Tue, 2017-04-18 at 11:53 +0100, Jon Turney wrote:
> This is possibly an actual bug in failing to check we successfuly retrieved
> the monitor size before using it to set the X screen size.
It is indeed.
> @@ -261,6 +261,9 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
> ErrorF("Monitor number %d no longer exists!\n",
> s_pScreenInfo->iMonitor);
> }
> + ErrorF("QueryMonitor %d failed!\n",
> + s_pScreenInfo->iMonitor);
> +
This is inside if (QueryMonitor()), which returns true most of the
time. It only returns false if the second argument is null (which it
won't ever be since it's on the stack), and also ignores the return
value from EnumDisplayMonitors. So basically you're now printing that
it fails on every call.
- ajax
More information about the xorg-devel
mailing list