fix codecheck "do not use C-style cast to convert between unrelated types"

Signed-off-by: yudechen <chenyude@huawei.com>
Change-Id: I85f54dd02e7f9e8622f2525fb404b5d7019d7973
This commit is contained in:
yudechen
2022-04-24 18:32:47 +08:00
parent 67470b18b4
commit f54894f72d
+1 -1
View File
@@ -64,7 +64,7 @@ napi_value QuerySystemCapability(napi_env env, napi_callback_info info)
goto FREE_PRIOUTPUT;
}
osCapU32 = (uint32_t *)(osOutput + 2); // 2, header of pcid.sc
osCapU32 = reinterpret_cast<uint32_t *>(osOutput + 2); // 2, header of pcid.sc
for (i = 0; i < OS_SYSCAP_U32_NUM; i++) {
retError = sprintf_s(osCapArray[i], U32_TO_STR_MAX_LEN, "%u", osCapU32[i]);
if (retError == -1) {