From e7cd245628967fab4a80f1d7b9f30491c38c4a0e Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 6 Oct 2021 10:05:54 +0200 Subject: [PATCH] Silence compiler warning clang warns that: local variable 'big' will be copied despite being returned by name [-Wreturn-std-move] So force the intended move using std::move. Change-Id: If5ff557c1b577789e6659783d8106295fafb3485 Reviewed-by: Edward Welbourne --- .../text/qbytearrayapisymmetry/tst_qbytearrayapisymmetry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/text/qbytearrayapisymmetry/tst_qbytearrayapisymmetry.cpp b/tests/auto/corelib/text/qbytearrayapisymmetry/tst_qbytearrayapisymmetry.cpp index 2feb911af6..55c1e72a3e 100644 --- a/tests/auto/corelib/text/qbytearrayapisymmetry/tst_qbytearrayapisymmetry.cpp +++ b/tests/auto/corelib/text/qbytearrayapisymmetry/tst_qbytearrayapisymmetry.cpp @@ -1266,7 +1266,7 @@ static QByteArray decNext(QByteArray &&big) while (big.at(i) == '9') big[i--] = '0'; big[i] += 1; - return big; + return std::move(big); } void tst_QByteArrayApiSymmetry::toLongLong_data() const