fix compile warning

Signed-off-by: hanweiqi <hanweiqi3@huawei.com>
This commit is contained in:
hanweiqi 2024-06-06 14:15:28 +08:00
parent 4bd3a62b02
commit c9c56af187
3 changed files with 3 additions and 5 deletions

View File

@ -70,7 +70,7 @@ ErrCode AotCompilerInterfaceProxy::AotCompiler(
}
int32_t sigDataSize = reply.ReadInt32();
if (sigDataSize > vectorMaxSize) {
if (static_cast<unsigned long>(sigDataSize) > vectorMaxSize) {
HiLog::Error(LABEL, "The vector/array size exceeds the security limit!");
return ERR_INVALID_DATA;
}

View File

@ -57,7 +57,7 @@ int32_t AotCompilerInterfaceStub::CommandAOTCompiler(MessageParcel &data,
{
std::unordered_map<std::string, std::string> argsMap;
int32_t argsMapSize = data.ReadInt32();
if (argsMapSize > mapMaxSize) {
if (static_cast<unsigned long>(argsMapSize) > mapMaxSize) {
HiLog::Error(LABEL, "The map size exceeds ths security limit!");
return ERR_INVALID_DATA;
}

View File

@ -2409,9 +2409,7 @@ BaseNode *CGLowerer::LowerExpr(BaseNode &parent, BaseNode &expr, BlockNode &blkN
switch (expr.GetOpCode()) {
case OP_array: {
ProcessArrayExpr(expr, blkNode);
if (!mirModule.IsCModule()) {
return LowerArray(static_cast<ArrayNode &>(expr), parent);
}
return LowerArray(static_cast<ArrayNode &>(expr), parent);
}
case OP_dread: