modify for compile warning

Signed-off-by: niulihua <niulihua3@huawei.com>
Change-Id: Ie110e8c8bb3a79f2cf1d74653eeaebba6a95d7f3
This commit is contained in:
niulihua
2022-01-25 23:27:37 -08:00
parent 8a443b3963
commit 96fdbc4120
Regular → Executable
+7 -3
View File
@@ -22,14 +22,17 @@
#include <cerrno>
#include <csignal>
#include <cstring>
#include "securec.h"
#endif
namespace {
#ifndef _WIN32
#ifdef _WIN32
constexpr int32_t HUNDRED_NS_PER_MS = 10000;
#elif defined(_LITEOS)
#else
constexpr int16_t MS_PER_SECOND = 1000;
constexpr int32_t NS_PER_MS = 1000000;
#endif
constexpr int32_t HUNDRED_NS_PER_MS = 10000;
} // namespace
namespace OHOS {
@@ -212,7 +215,8 @@ GraphicTimer::GraphicTimer(int32_t periodMs, GraphicTimerCb cb, void* arg, bool
return;
}
struct sigevent sev = {0};
struct sigevent sev;
(void)memset_s(&sev, sizeof(sev), 0, sizeof(sev));
sev.sigev_notify = SIGEV_THREAD;
sev.sigev_notify_function = TimerCallback;
sev.sigev_value.sival_ptr = this;