summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2022-04-22 10:15:02 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2022-04-25 15:05:25 +0200
commitb3651868609cc1d4b9316d8ec65a0656b421970e (patch)
tree20b5ec2ba9e4dc19d7e001678ece7399a47c7792 /src/gui/kernel
parent242633430ba22d8f4d390067d4a68a4f54826af2 (diff)
Fix unused variables in qtbase
clang compiler recently got smarter and detects "pseudo used variable" patterns where we declare a variable and only use it in self-increments, self-decrements and other similar expressions Errors: qtbase/src/corelib/text/qlocale.cpp:3898:9: error: variable 'group_cnt' set but not used [-Werror,-Wunused-but-set-variable] int group_cnt = 0; // counts number of group chars ^ qtbase/src/corelib/text/qunicodetools.cpp:1372:21: error: variable 'uc' set but not used [-Werror,-Wunused-but-set-variable] const char16_t *uc = text + from; ^ and more of the kind Remove the ones that have no usage, mark others with [[maybe_unused]] Pick-to: 6.3 6.2 Change-Id: Ib2d0722110e3da8c39e29ec78c0ec290d064c970 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qplatformcursor.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/kernel/qplatformcursor.cpp b/src/gui/kernel/qplatformcursor.cpp
index 1330b5bf31..825cb435f8 100644
--- a/src/gui/kernel/qplatformcursor.cpp
+++ b/src/gui/kernel/qplatformcursor.cpp
@@ -619,7 +619,7 @@ void QPlatformCursorImage::set(const uchar *data, const uchar *mask,
int p = 0;
int d, m;
- int x = -1, w = 0;
+ int x = -1;
uchar *cursor_data = cursorImage.bits();
qsizetype bpl = cursorImage.bytesPerLine();
@@ -641,15 +641,11 @@ void QPlatformCursorImage::set(const uchar *data, const uchar *mask,
x = j*8+b;
else if (x >= 0 && !m) {
x = -1;
- w = 0;
}
- if (m)
- w++;
}
}
if (x >= 0) {
x = -1;
- w = 0;
}
cursor_data += bpl;
}