From 6d0f22e42faa62982d347ad7485d840c3ee172e6 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Thu, 8 Jun 2017 17:28:33 -0700 Subject: [PATCH] Fix mock_env.cc uninitialized variable Summary: Mingw is complaining about uninitialized variable in mock_env.cc. e.g. https://travis-ci.org/facebook/rocksdb/jobs/240132276 The fix is to initialize the variable. Closes https://github.com/facebook/rocksdb/pull/2428 Differential Revision: D5211306 Pulled By: yiwu-arbug fbshipit-source-id: ee02bf0327dcea8590a2aa087f0176fecaf8621c --- env/mock_env.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/mock_env.cc b/env/mock_env.cc index 66ecfeff3..bc295e0e7 100644 --- a/env/mock_env.cc +++ b/env/mock_env.cc @@ -378,7 +378,7 @@ class TestMemLogger : public Logger { struct timeval now_tv; gettimeofday(&now_tv, nullptr); const time_t seconds = now_tv.tv_sec; - struct tm t; + struct tm t{0, 0, 0, 0, 0, 0, 0, 0, 0}; auto ret __attribute__((__unused__)) = localtime_r(&seconds, &t); assert(ret); p += snprintf(p, limit - p,