From 91248b0f3b40aaebb0e02a127ee936b581b10eab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 8 Mar 2012 11:46:08 +0100 Subject: [PATCH] Silence 'narrowing conversion' warning in test Seen with gcc 4.6: tst_qarraydata.cpp: In member function 'void tst_QArrayData::grow()': tst_qarraydata.cpp:1445:29: error: narrowing conversion of 'i' from 'size_t {aka long unsigned int}' to 'int' inside { } [-fpermissive] Change-Id: Iad55659554b64ee34655640d606153f058a8cd05 Reviewed-by: Thiago Macieira --- tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp index 884f4f7..7ea91bc 100644 --- a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp +++ b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp @@ -1442,7 +1442,7 @@ void tst_QArrayData::grow() size_t previousCapacity = vector.capacity(); size_t allocations = 0; for (size_t i = 1; i <= (1 << 20); ++i) { - int source[1] = { i }; + int source[1] = { int(i) }; vector.append(source, source + 1); QCOMPARE(vector.size(), i); if (vector.capacity() != previousCapacity) { -- 2.7.4