From 8530163847c3934d004d087d5dc08ad5ce2afce9 Mon Sep 17 00:00:00 2001 From: Robert Drab Date: Mon, 29 Mar 2021 13:15:08 +0200 Subject: [PATCH] Fix nullptr cast warning Signed-off-by: Robert Drab --- kernel_lite/time_posix/src/TimeUtilsTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel_lite/time_posix/src/TimeUtilsTest.cpp b/kernel_lite/time_posix/src/TimeUtilsTest.cpp index ea354afdb..7da880e44 100755 --- a/kernel_lite/time_posix/src/TimeUtilsTest.cpp +++ b/kernel_lite/time_posix/src/TimeUtilsTest.cpp @@ -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!"; } -- GitLab