mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-26 19:50:55 +00:00
Modifying Code Alarms
Signed-off-by: hwx1163501 <hanjing35@huawei.com> issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I849Y4
This commit is contained in:
parent
22a16fa7c7
commit
5eb41e6e43
@ -396,9 +396,9 @@ void ElfBuilder::FixSymtab(llvm::ELF::Elf64_Shdr* shdr)
|
||||
localCount = static_cast<int>(i);
|
||||
}
|
||||
if (sy->getType() == llvm::ELF::STT_SECTION) {
|
||||
sy->st_shndx = shStrTabIndex;
|
||||
sy->st_shndx = static_cast<uint16_t>(shStrTabIndex);
|
||||
} else if (sy->getType() == llvm::ELF::STT_FUNC) {
|
||||
sy->st_shndx = textSecIndex;
|
||||
sy->st_shndx = static_cast<uint16_t>(textSecIndex);
|
||||
sy->st_value += textSecOffset;
|
||||
}
|
||||
if (sy->st_shndx > secNum) {
|
||||
|
@ -83,8 +83,8 @@ public:
|
||||
|
||||
int ShouldFreeMore(size_t cachedSize) {
|
||||
os::memory::LockHolder lock(lock_);
|
||||
size_t result = regularMapCommitted_.size();
|
||||
return result - cachedSize / REGULAR_MMAP_SIZE;
|
||||
int result = regularMapCommitted_.size();
|
||||
return result - static_cast<int>(cachedSize / REGULAR_MMAP_SIZE);
|
||||
}
|
||||
|
||||
void AddMemToCommittedCache(void *mem, size_t size)
|
||||
|
@ -181,7 +181,7 @@ public:
|
||||
{
|
||||
if (type_.index() == 0) {
|
||||
auto oldType = static_cast<uint32_t>(std::get<Type>(type_));
|
||||
oldType = oldType & AnyType();
|
||||
oldType = oldType & static_cast<uint32_t>(AnyType());
|
||||
type_ =
|
||||
Type(oldType | static_cast<uint32_t>(std::get<Type>(type.type_)));
|
||||
} else {
|
||||
@ -230,7 +230,7 @@ public:
|
||||
Type GetPrimitiveType() const
|
||||
{
|
||||
auto type = static_cast<uint32_t>(std::get<Type>(type_));
|
||||
return Type(type & AnyType());
|
||||
return Type(type & static_cast<uint32_t>(AnyType()));
|
||||
}
|
||||
|
||||
uint32_t GetWeight() const
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -20,6 +20,7 @@ import nltk
|
||||
import cv2
|
||||
import tempfile
|
||||
import pytest
|
||||
import subprocess
|
||||
|
||||
web_path = os.path.realpath("../dist")
|
||||
|
||||
@ -60,7 +61,7 @@ def setup():
|
||||
os.chdir("..")
|
||||
|
||||
print("setup : 编译项目")
|
||||
os.system("npm run dist")
|
||||
subprocess.run(["npm", "run", "dist"])
|
||||
|
||||
print("setup : 拷贝测试文件")
|
||||
shutil.copy("examples/log_loop.txt", "dist/test.txt")
|
||||
|
Loading…
Reference in New Issue
Block a user