GNU C library for struct tm has 2 additional fields.
Summary: initialize 2 additional fields tm_gmtoff and tm_zone, otherwise under strict warnings for initialization, we get errors in myrocks. Closes https://github.com/facebook/rocksdb/pull/2439 Differential Revision: D5229013 Pulled By: yiwu-arbug fbshipit-source-id: 9fc1615a1919656f36064791706ed41e10e9db84
This commit is contained in:
parent
d713471da8
commit
7a270069b3
3
env/mock_env.cc
vendored
3
env/mock_env.cc
vendored
@ -378,7 +378,8 @@ 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{0, 0, 0, 0, 0, 0, 0, 0, 0};
|
struct tm t;
|
||||||
|
memset(&t, 0, sizeof(t));
|
||||||
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…
Reference in New Issue
Block a user