From 5e84023344bfe8987c3ce5edf57f30261d677d2c Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Fri, 27 Nov 2020 10:17:26 +0100 Subject: [PATCH] Fix warnings about unused variables in benchmarks This patch removes two unused variables and marks one unused, fixing three warnings. Change-Id: I71f59839452590b82ffb5459a968f06bd434fb9a Reviewed-by: Ivan Solovev Reviewed-by: Sona Kurazyan --- tests/benchmarks/corelib/tools/containers-associative/main.cpp | 1 + .../network/access/qnetworkreply/tst_qnetworkreply.cpp | 1 - .../graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/benchmarks/corelib/tools/containers-associative/main.cpp b/tests/benchmarks/corelib/tools/containers-associative/main.cpp index 2f36bfda4f..555d4bf843 100644 --- a/tests/benchmarks/corelib/tools/containers-associative/main.cpp +++ b/tests/benchmarks/corelib/tools/containers-associative/main.cpp @@ -111,6 +111,7 @@ void testLookup(int size) val = container.value(i); } + Q_UNUSED(val); } void tst_associative_containers::lookup() diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp index 559ed82834..04a36ff860 100644 --- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -233,7 +233,6 @@ class ThreadedDataReaderHttpServer: public QThread // used to make the constructor only return after the tcp server started listening QSemaphore ready; QTcpSocket *client; - int timeout; int port; public: qint64 transferRate; diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp index 6cb3140e58..d62efedb0c 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp +++ b/tests/benchmarks/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp @@ -114,8 +114,6 @@ void tst_QGraphicsLayout::invalidate() // ...then measure... - int pass = 1; - // should be as small as possible, to reduce overhead of painting QSizeF size(1, 1); setGeometryCalls->clear();