aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@qt.io>2022-03-04 11:18:09 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-05 02:34:25 +0000
commitfcb185b6d26be491ba60380fd963b0027637d698 (patch)
tree6ad9dfc8ef26c2ab51eb106001a1123fb801e30b
parentb386b6491d3486a78aee88e432f0d33f8ae39d06 (diff)
QNX: Fix compiler warnings about unused parameters
warning: unused parameter 'usage' [-Wunused-parameter] warning: unused parameter 'writable' [-Wunused-parameter] warning: unused parameter 'executable' [-Wunused-parameter] warning: unused parameter 'lineCount' [-Wunused-parameter] Fixes: QTBUG-101383 Change-Id: I22089b1aeea927468e61769dcbbc8e363b9d734e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit a90d624f0eb96921141f421555b4f7dde4026afd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/3rdparty/masm/wtf/OSAllocatorPosix.cpp3
-rw-r--r--src/qmltest/quicktestutil.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
index cee6b40599..f7d8a0b30f 100644
--- a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
+++ b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp
@@ -97,6 +97,9 @@ static int memfdForUsage(size_t bytes, OSAllocator::Usage usage)
void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable, bool executable)
{
#if OS(QNX)
+ UNUSED_PARAM(usage);
+ UNUSED_PARAM(writable);
+ UNUSED_PARAM(executable);
// Reserve memory with PROT_NONE and MAP_LAZY so it isn't committed now.
void* result = mmap(0, bytes, PROT_NONE, MAP_LAZY | MAP_PRIVATE | MAP_ANON, -1, 0);
if (result == MAP_FAILED)
diff --git a/src/qmltest/quicktestutil.cpp b/src/qmltest/quicktestutil.cpp
index 25863c3842..fd6f294673 100644
--- a/src/qmltest/quicktestutil.cpp
+++ b/src/qmltest/quicktestutil.cpp
@@ -72,6 +72,8 @@ void QuickTestUtil::populateClipboardText(int lineCount)
for (int i = lineCount; i > 0; --i)
lines << fmt.arg(i).arg(i - 1);
QGuiApplication::clipboard()->setText(lines.join(u'\n'));
+#else
+ Q_UNUSED(lineCount)
#endif
}