提交 85301638 编写于 作者: R Robert Drab

Fix nullptr cast warning

Signed-off-by: NRobert Drab <robert.drab@huawei.com>
上级 0094543b
......@@ -292,7 +292,7 @@ HWTEST_F(TimeUtilsTest, testStrftimeL, Function | MediumTest | Level2)
tm1 = localtime(&g_time);
ASSERT_NE(nullptr, tm1);
size_t ftime = strftime_l(buffer, sizeof(buffer) - 1, "%F %T %Z", tm1, (locale_t)0);
size_t ftime = strftime_l(buffer, sizeof(buffer) - 1, "%F %T %Z", tm1, nullptr);
EXPECT_GT(ftime, g_zero) << "strftime return error!";
EXPECT_STREQ(buffer, "1970-01-01 05:14:40 UTC") << "buffer return error!";
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册