diff --git a/frameworks/wms/lite_proxy_surface.cpp b/frameworks/wms/lite_proxy_surface.cpp index 7b26da821c176ac604b225824b9712b8de60b24e..2bf023901a39771c5418513aa320bd7361e6b854 100644 --- a/frameworks/wms/lite_proxy_surface.cpp +++ b/frameworks/wms/lite_proxy_surface.cpp @@ -45,7 +45,7 @@ void LiteProxySurface::Lock(void** buf, void** phyMem, uint32_t* strideLen) } *buf = buffer_->GetVirAddr(); uintptr_t phyAddr = buffer_->GetPhyAddr(); - *phyMem = (void*)phyAddr; + *phyMem = reinterpret_cast(phyAddr); *strideLen = surface_->GetStride(); GRAPHIC_LOGI("strideLen=%d", *strideLen); } diff --git a/frameworks/wms/lite_win_requestor.cpp b/frameworks/wms/lite_win_requestor.cpp index 652ef728ce3868c75ff7c125d44e8d7429128dcc..d8c8a12c1599817b1bc6c03b938a63c85986dc65 100644 --- a/frameworks/wms/lite_win_requestor.cpp +++ b/frameworks/wms/lite_win_requestor.cpp @@ -44,7 +44,7 @@ int LiteWinRequestor::Callback(void* owner, int code, IpcIo* reply) return -1; } - CallBackPara* para = (CallBackPara*)owner; + CallBackPara* para = static_cast(owner); GRAPHIC_LOGD("Callback, funcId = %d", para->funcId); switch (para->funcId) { case LiteWMS_GetSurface: { diff --git a/frameworks/wms/lite_wm_requestor.cpp b/frameworks/wms/lite_wm_requestor.cpp index 7fbf7aff0916f0ec6a2489d281bfa3f6ed76a1b8..4f6fa615edd5b8731e804cccb2ad85ae0ed4c845 100644 --- a/frameworks/wms/lite_wm_requestor.cpp +++ b/frameworks/wms/lite_wm_requestor.cpp @@ -39,10 +39,10 @@ int LiteWMRequestor::Callback(void* owner, int code, IpcIo* reply) return -1; } - CallBackPara* para = (CallBackPara*)owner; + CallBackPara* para = static_cast(owner); switch (para->funcId) { case LiteWMS_CreateWindow: { - LiteWinRequestor** requestor = (LiteWinRequestor**)(para->data); + LiteWinRequestor** requestor = static_cast(para->data); if (requestor == nullptr) { break; } @@ -58,7 +58,7 @@ int LiteWMRequestor::Callback(void* owner, int code, IpcIo* reply) } case LiteWMS_GetEventData: { DeviceData* data = static_cast(ReadRawData(reply, sizeof(DeviceData))); - DeviceData* retData = (DeviceData*)(para->data); + DeviceData* retData = static_cast(para->data); if (data != nullptr && retData != nullptr) { *retData = *data; } @@ -75,7 +75,7 @@ int LiteWMRequestor::Callback(void* owner, int code, IpcIo* reply) } case LiteWMS_GetLayerInfo: { LiteLayerInfo* data = static_cast(ReadRawData(reply, sizeof(LiteLayerInfo))); - LiteLayerInfo* retData = (LiteLayerInfo*)(para->data); + LiteLayerInfo* retData = static_cast(para->data); if (data != nullptr && retData != nullptr) { *retData = *data; } @@ -174,7 +174,7 @@ void LiteWMRequestor::GetEventData(DeviceData* data) int LiteWMRequestor::SurfaceRequestHandler(uint32_t code, IpcIo* data, IpcIo* reply, MessageOption option) { - SurfaceImpl* surface = (SurfaceImpl*)(option.args); + SurfaceImpl* surface = reinterpret_cast(option.args); if (surface == nullptr) { return 0; }