修复ffi桥阶层代码告警问题

Signed-off-by: PipiSummer <xiatian44@huawei.com>
Change-Id: If41533ac1ee816302bd13664694e0721f74e5b99
This commit is contained in:
PipiSummer 2024-09-26 19:33:19 +08:00
parent b2842105f0
commit 9d00000f06
2 changed files with 8 additions and 8 deletions

View File

@ -26,9 +26,9 @@ extern "C" {
char* name;
char* id;
char* label;
int32_t labelId;
uint32_t labelId;
char* icon;
int32_t iconId;
uint32_t iconId;
};
struct CInputMethodSubtype {
@ -37,9 +37,9 @@ extern "C" {
char* locale;
char* language;
char* label;
int32_t labelId;
uint32_t labelId;
char* icon;
int32_t iconId;
uint32_t iconId;
char* mode;
};

View File

@ -150,7 +150,7 @@ RetInputMethodSubtype FfiInputMethodSettingListInputMethodSubtype(CInputMethodPr
return ret;
}
IMSA_HILOGI("exec ListInputMethodSubtype success");
ret.size = subProps.size();
ret.size = static_cast<int64_t>(subProps.size());
if (ret.size > 0) {
ret.head = static_cast<CInputMethodSubtype *>(malloc(sizeof(CInputMethodSubtype) * ret.size));
}
@ -182,7 +182,7 @@ RetInputMethodSubtype FfiInputMethodSettingListCurrentInputMethodSubtype()
return ret;
}
IMSA_HILOGI("exec ListCurrentInputMethodSubtype success.");
ret.size = subProps.size();
ret.size = static_cast<int64_t>(subProps.size());
if (ret.size > 0) {
ret.head = static_cast<CInputMethodSubtype *>(malloc(sizeof(CInputMethodSubtype) * ret.size));
}
@ -213,7 +213,7 @@ RetInputMethodProperty FfiInputMethodSettingGetInputMethods(bool enable)
if (errCode != ErrorCode::NO_ERROR) {
return ret;
}
ret.size = properties.size();
ret.size = static_cast<int64_t>(properties.size());
if (ret.size > 0) {
ret.head = static_cast<CInputMethodProperty *>(malloc(sizeof(CInputMethodProperty) * ret.size));
}
@ -244,7 +244,7 @@ RetInputMethodProperty FfiInputMethodSettingGetAllInputMethods()
if (errCode != ErrorCode::NO_ERROR) {
return ret;
}
ret.size = properties.size();
ret.size = static_cast<int64_t>(properties.size());
if (ret.size > 0) {
ret.head = static_cast<CInputMethodProperty *>(malloc(sizeof(CInputMethodProperty) * ret.size));
}