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
main
Yi Wu 8 years ago committed by Facebook Github Bot
parent c2012d488f
commit 6d0f22e42f
  1. 2
      env/mock_env.cc

2
env/mock_env.cc vendored

@ -378,7 +378,7 @@ class TestMemLogger : public Logger {
struct timeval now_tv; struct timeval now_tv;
gettimeofday(&now_tv, nullptr); gettimeofday(&now_tv, nullptr);
const time_t seconds = now_tv.tv_sec; 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); auto ret __attribute__((__unused__)) = localtime_r(&seconds, &t);
assert(ret); assert(ret);
p += snprintf(p, limit - p, p += snprintf(p, limit - p,

Loading…
Cancel
Save