diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2012-03-08 11:46:08 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-13 23:55:30 +0100 |
commit | 91248b0f3b40aaebb0e02a127ee936b581b10eab (patch) | |
tree | 41e810aed12193155e9725502bd349d5663e3a62 | |
parent | 7786d15e93723eccef0f379c96f994be87375450 (diff) |
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 <thiago.macieira@intel.com>
-rw-r--r-- | tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp index 884f4f7d1d..7ea91bc538 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) { |