QBenchmarkResult: fix uninitialized value
This manifested itself in a UBSan report about loading a non-enumerated value from an enumeration variable: src/testlib/qbenchmark_p.h:95:7: runtime error: load of value 11091, which is not a valid value for type 'QBenchmarkMetric' (or similar). The chosen value is simply QTest::QBenchmarkMetric(0). Change-Id: I8492a871a71d89fa6f7902d38f9eecee4b060646 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>bb10
parent
7fc8c560e2
commit
b18e6396bd
|
|
@ -105,6 +105,7 @@ public:
|
|||
QBenchmarkResult()
|
||||
: value(-1)
|
||||
, iterations(-1)
|
||||
, metric(QTest::FramesPerSecond)
|
||||
, setByMacro(true)
|
||||
, valid(false)
|
||||
{ }
|
||||
|
|
|
|||
Loading…
Reference in New Issue