From 0a1c0accf04e317f7e7ac80b0d1be3fbb745ef90 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 27 Apr 2021 16:34:59 +0200 Subject: Fix compiler warnings from int/size_t mismatches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cast size_t return from std::vector explicitly to int to silence compiler warnings. Change-Id: I0c425b3cec7feec0712e1173ab7e60b28695d6d7 Reviewed-by: Tor Arne Vestbø --- .../auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp') diff --git a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp index f71bf59738..2795dbfabf 100644 --- a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp +++ b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp @@ -94,7 +94,7 @@ int main(int argc, char** argv) /* Run with no special arguments. */ { tst_BenchlibOptions test; - ret += QTest::qExec(&test, args.size(), const_cast(&args[0])); + ret += QTest::qExec(&test, int(args.size()), const_cast(&args[0])); } /* Run with an exact number of iterations. */ @@ -103,7 +103,7 @@ int main(int argc, char** argv) extraArgs.push_back("-iterations"); extraArgs.push_back("15"); tst_BenchlibFifteenIterations test; - ret += QTest::qExec(&test, extraArgs.size(), const_cast(&extraArgs[0])); + ret += QTest::qExec(&test, int(extraArgs.size()), const_cast(&extraArgs[0])); } /* @@ -114,7 +114,7 @@ int main(int argc, char** argv) extraArgs.push_back("-minimumvalue"); extraArgs.push_back("100"); tst_BenchlibOneHundredMinimum test; - ret += QTest::qExec(&test, extraArgs.size(), const_cast(&extraArgs[0])); + ret += QTest::qExec(&test, int(extraArgs.size()), const_cast(&extraArgs[0])); } return ret; -- cgit v1.2.3