From 142035edd4b1ab431c0ecbd547d4a77f1eca0667 Mon Sep 17 00:00:00 2001 From: Chris Mumford Date: Mon, 6 May 2019 10:51:11 -0700 Subject: [PATCH] Initialize Stats::start_ before first use in Stats::Start(). Avoids a use before initialization error. This fixes issue #676. PiperOrigin-RevId: 246855204 --- benchmarks/db_bench.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/benchmarks/db_bench.cc b/benchmarks/db_bench.cc index 3090b43..3696023 100644 --- a/benchmarks/db_bench.cc +++ b/benchmarks/db_bench.cc @@ -187,14 +187,12 @@ class Stats { void Start() { next_report_ = 100; - last_op_finish_ = start_; hist_.Clear(); done_ = 0; bytes_ = 0; seconds_ = 0; - start_ = g_env->NowMicros(); - finish_ = start_; message_.clear(); + start_ = finish_ = last_op_finish_ = g_env->NowMicros(); } void Merge(const Stats& other) {