diff --git a/tests/auto/corelib/tools/qspan/tst_qspan.cpp b/tests/auto/corelib/tools/qspan/tst_qspan.cpp index 91d2ecf739a..b8fcd0cdde3 100644 --- a/tests/auto/corelib/tools/qspan/tst_qspan.cpp +++ b/tests/auto/corelib/tools/qspan/tst_qspan.cpp @@ -173,7 +173,7 @@ void tst_QSpan::onlyZeroExtentSpansHaveDefaultCtors() const void tst_QSpan::zeroExtentSpansMaintainADataPointer() const { - int i; + int i = 0; QSpan si{&i, 0}; QCOMPARE(si.data(), &i); check_empty_span_incl_subspans(si);