From fa3b672f998486bb7771c8e32ed43c45f55c4e63 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Sun, 11 Apr 2021 14:53:55 +0200 Subject: [PATCH] Mark variables that might be unused under some configurations Silence compiler warnings. Pick-to: 6.1 Change-Id: I857cf2ee177eecf305e4fa14f6b69b019ce85468 Reviewed-by: Thiago Macieira --- tests/auto/corelib/text/qcollator/tst_qcollator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/corelib/text/qcollator/tst_qcollator.cpp b/tests/auto/corelib/text/qcollator/tst_qcollator.cpp index d1345906a9..1ff80294fe 100644 --- a/tests/auto/corelib/text/qcollator/tst_qcollator.cpp +++ b/tests/auto/corelib/text/qcollator/tst_qcollator.cpp @@ -290,8 +290,8 @@ void tst_QCollator::compare() collator.setNumericMode(true); int keyCompareResult = result; - int keyCompareCaseInsensitiveResult = caseInsensitiveResult; - int keyComparePunctuationResultResult = punctuationResult; + [[maybe_unused]]int keyCompareCaseInsensitiveResult = caseInsensitiveResult; + [[maybe_unused]]int keyComparePunctuationResultResult = punctuationResult; // trying to deal with special behavior of different OS-dependent collators if (collator.locale() == QLocale("C")) {