mirror of
https://github.com/openharmony/graphic_utils.git
synced 2026-07-19 16:33:31 -04:00
modify for compile warning
Signed-off-by: niulihua <niulihua3@huawei.com> Change-Id: Ie110e8c8bb3a79f2cf1d74653eeaebba6a95d7f3
This commit is contained in:
Regular → Executable
+7
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user