diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp index 3d8759fba58..a5bf9cf34f2 100644 --- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp +++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp @@ -134,7 +134,7 @@ void tst_QGlobal::for_each() QCOMPARE(counter, list.count()); // Should also work with an existing variable - int local; + int local = 0; counter = 0; foreach (local, list) { QCOMPARE(local, counter++);