From 38aec5374a980a876c5ea5b41cdc9b823ad3df23 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 14 Jul 2020 00:05:33 +0000 Subject: [PATCH] use loop-local variable in qt_x11_getX11InfoForWindow() Signed-off-by: Ivailo Monev --- src/gui/kernel/qwidget_x11.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 140f9bbb3..0ee6f0e8e 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -425,8 +425,7 @@ void qt_x11_getX11InfoForWindow(QX11Info *xinfo, const void *att) const XWindowAttributes *a = static_cast(att); // find which screen the window is on... xd->screen = QX11Info::appScreen(); // by default, use the default :) - int i; - for (i = 0; i < ScreenCount(qt_x11Data->display); i++) { + for (int i = 0; i < ScreenCount(qt_x11Data->display); i++) { if (RootWindow(qt_x11Data->display, i) == a->root) { xd->screen = i; break; -- 2.11.0