tst_QSpan: fix GCC 11 -Wmaybe-uninitialized
GCC 11 doesn't understand that 'i' isn't ever read from (because all
spans created over it have size zero), but initialize it nonetheless
to suppress the warning.
Amends f82cf6333e.
Pick-to: 6.7
Change-Id: Ibfb3e9b7fdcbe93c43b7873986c74b4b5a0c9e54
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
bb10
parent
725455ed33
commit
6736fe3a0f
|
|
@ -173,7 +173,7 @@ void tst_QSpan::onlyZeroExtentSpansHaveDefaultCtors() const
|
|||
|
||||
void tst_QSpan::zeroExtentSpansMaintainADataPointer() const
|
||||
{
|
||||
int i;
|
||||
int i = 0;
|
||||
QSpan<int, 0> si{&i, 0};
|
||||
QCOMPARE(si.data(), &i);
|
||||
check_empty_span_incl_subspans(si);
|
||||
|
|
|
|||
Loading…
Reference in New Issue