mirror of
https://gitee.com/openharmony/arkcompiler_runtime_core
synced 2024-11-27 08:50:45 +00:00
Fix codeCheck warnings
Fix codeCheck warnings. Issue: I63WHB Tests: defectscanaux_ut, runtime_core_ut, standalone build, test262 Signed-off-by: songqi <songqi32@huawei.com> Change-Id: I5098ec460d3396a6e887467684a11ad579d40c11
This commit is contained in:
parent
ca6d529e11
commit
2c9369c06d
@ -82,7 +82,7 @@ private:
|
||||
const std::unordered_map<panda_file::Type::TypeId, panda_file::PrimitiveTypeItem *> &primitive_types,
|
||||
const std::string &name, const Record &rec);
|
||||
static bool HandleBaseRecord(panda_file::ItemContainer *items, const Program &program, const std::string &name,
|
||||
const Record &rec, panda_file::ClassItem *record);
|
||||
const Record &base_rec, panda_file::ClassItem *record);
|
||||
static bool HandleInterfaces(panda_file::ItemContainer *items, const Program &program, const std::string &name,
|
||||
const Record &rec, panda_file::ClassItem *record);
|
||||
static bool HandleFields(
|
||||
|
@ -114,7 +114,7 @@ private:
|
||||
/*
|
||||
* Returns a string representation of a token type.
|
||||
*/
|
||||
std::string_view TokenTypeWhat(Token::Type);
|
||||
std::string_view TokenTypeWhat(Token::Type t);
|
||||
|
||||
} // namespace panda::pandasm
|
||||
|
||||
|
@ -569,7 +569,7 @@ void BytecodeGen::VisitIntrinsic(GraphVisitor *visitor, Inst *inst_base)
|
||||
VisitEcma(visitor, inst_base);
|
||||
}
|
||||
|
||||
void BytecodeGen::VisitCatchPhi(GraphVisitor *v, Inst *inst)
|
||||
void BytecodeGen::VisitCatchPhi(GraphVisitor *visitor, Inst *inst)
|
||||
{
|
||||
if (inst->CastToCatchPhi()->IsAcc()) {
|
||||
for (auto &user : inst->GetUsers()) {
|
||||
|
@ -100,14 +100,14 @@ public:
|
||||
{
|
||||
return GetGraph()->GetBlocksRPO();
|
||||
}
|
||||
static void VisitSpillFill(GraphVisitor *v, Inst *inst);
|
||||
static void VisitConstant(GraphVisitor *v, Inst *inst);
|
||||
static void VisitSpillFill(GraphVisitor *visitor, Inst *inst);
|
||||
static void VisitConstant(GraphVisitor *visitor, Inst *inst);
|
||||
static void VisitCatchPhi(GraphVisitor *visitor, Inst *inst);
|
||||
|
||||
static void VisitIf(GraphVisitor *v, Inst *inst_base);
|
||||
static void VisitIfImm(GraphVisitor *v, Inst *inst_base);
|
||||
static void IfImmZero(GraphVisitor *v, Inst *inst_base);
|
||||
static void VisitIntrinsic(GraphVisitor *v, Inst *inst_base);
|
||||
static void VisitIntrinsic(GraphVisitor *visitor, Inst *inst_base);
|
||||
static void VisitLoadString(GraphVisitor *v, Inst *inst_base);
|
||||
static void VisitReturn(GraphVisitor *v, Inst *inst_base);
|
||||
|
||||
|
@ -121,7 +121,7 @@ public:
|
||||
return GetGraph()->GetBlocksRPO();
|
||||
}
|
||||
|
||||
static void VisitIntrinsic(GraphVisitor *v, Inst *inst);
|
||||
static void VisitIntrinsic(GraphVisitor *visitor, Inst *inst);
|
||||
|
||||
#include "generated/reg_encoder_visitors.inc"
|
||||
|
||||
|
@ -1295,8 +1295,8 @@ public:
|
||||
vn_ = vn;
|
||||
}
|
||||
void Dump(std::ostream *out, bool new_line = true) const;
|
||||
virtual bool DumpInputs(std::ostream * /* out */) const;
|
||||
virtual void DumpOpcode(std::ostream * /* out */) const;
|
||||
virtual bool DumpInputs(std::ostream *out) const;
|
||||
virtual void DumpOpcode(std::ostream *out) const;
|
||||
|
||||
virtual void SetDstReg([[maybe_unused]] unsigned index, Register reg)
|
||||
{
|
||||
@ -1849,7 +1849,7 @@ public:
|
||||
ASSERT(index < GetInputsCount());
|
||||
return GetOperandsType();
|
||||
}
|
||||
void DumpOpcode(std::ostream * /* unused */) const override;
|
||||
void DumpOpcode(std::ostream *out) const override;
|
||||
|
||||
void SetVnObject(VnObject *vn_obj) override;
|
||||
|
||||
@ -2122,7 +2122,7 @@ public:
|
||||
return imm_slot_;
|
||||
}
|
||||
|
||||
bool DumpInputs(std::ostream * /* out */) const override;
|
||||
bool DumpInputs(std::ostream *out) const override;
|
||||
|
||||
Inst *Clone(const Graph *targetGraph) const override;
|
||||
|
||||
@ -2230,7 +2230,7 @@ public:
|
||||
sf_type_ = type;
|
||||
}
|
||||
|
||||
bool DumpInputs(std::ostream * /* out */) const override;
|
||||
bool DumpInputs(std::ostream *out) const override;
|
||||
|
||||
Inst *Clone(const Graph *targetGraph) const override;
|
||||
|
||||
@ -2257,7 +2257,7 @@ public:
|
||||
arg_number_ = arg_number;
|
||||
}
|
||||
|
||||
bool DumpInputs(std::ostream * /* out */) const override;
|
||||
bool DumpInputs(std::ostream *out) const override;
|
||||
|
||||
Inst *Clone(const Graph *targetGraph) const override;
|
||||
|
||||
@ -2316,7 +2316,7 @@ public:
|
||||
/// Get input instruction corresponding to the given basic block, can't be null.
|
||||
Inst *GetPhiInput(BasicBlock *bb);
|
||||
Inst *GetPhiDataflowInput(BasicBlock *bb);
|
||||
bool DumpInputs(std::ostream * /* out */) const override;
|
||||
bool DumpInputs(std::ostream *out) const override;
|
||||
|
||||
// Get index of the given block in phi inputs
|
||||
size_t GetPredBlockIndex(const BasicBlock *block) const;
|
||||
@ -2627,7 +2627,7 @@ public:
|
||||
|
||||
void SetVnObject(VnObject *vn_obj) override;
|
||||
|
||||
void DumpOpcode(std::ostream * /* out */) const override;
|
||||
void DumpOpcode(std::ostream *out) const override;
|
||||
|
||||
Inst *Clone(const Graph *targetGraph) const override;
|
||||
|
||||
@ -2679,7 +2679,7 @@ public:
|
||||
return GetOperandsType();
|
||||
}
|
||||
|
||||
void DumpOpcode(std::ostream * /* unused */) const override;
|
||||
void DumpOpcode(std::ostream *out) const override;
|
||||
|
||||
void SetVnObject(VnObject *vn_obj) override;
|
||||
|
||||
@ -2720,8 +2720,8 @@ public:
|
||||
return GetOperandsType();
|
||||
}
|
||||
|
||||
void DumpOpcode(std::ostream * /* unused */) const override;
|
||||
bool DumpInputs(std::ostream * /* unused */) const override;
|
||||
void DumpOpcode(std::ostream *out) const override;
|
||||
bool DumpInputs(std::ostream *out) const override;
|
||||
void SetVnObject(VnObject *vn_obj) override;
|
||||
|
||||
Inst *Clone(const Graph *targetGraph) const override
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
Graph *GetGraph() const;
|
||||
|
||||
protected:
|
||||
static void VisitSpillFill(GraphVisitor *v, Inst *inst);
|
||||
static void VisitSpillFill(GraphVisitor *visitor, Inst *inst);
|
||||
|
||||
private:
|
||||
bool NeedToResolve(const ArenaVector<SpillFillData> &spill_fills);
|
||||
|
@ -41,7 +41,7 @@ inline ArenaT *MallocMemPool::AllocArenaImpl(size_t size, [[maybe_unused]] Space
|
||||
LOG_MALLOC_MEM_POOL(DEBUG) << "Try to get new arena with size " << std::dec << size << " for "
|
||||
<< SpaceTypeToString(space_type);
|
||||
size_t max_alignment_drift = 0;
|
||||
if (DEFAULT_ALIGNMENT_IN_BYTES > alignof(ArenaT)) {
|
||||
if (alignof(ArenaT) < DEFAULT_ALIGNMENT_IN_BYTES) {
|
||||
max_alignment_drift = DEFAULT_ALIGNMENT_IN_BYTES - alignof(ArenaT);
|
||||
}
|
||||
size_t max_size = size + sizeof(ArenaT) + max_alignment_drift;
|
||||
|
@ -26,7 +26,7 @@ constexpr size_t ZIP_MAGIC_OFFSET = 8U;
|
||||
|
||||
bool IsZipMagic(uint32_t magic)
|
||||
{
|
||||
return (('P' == ((magic >> 0U) & ZIP_MAGIC_MASK)) && ('K' == ((magic >> ZIP_MAGIC_OFFSET) & ZIP_MAGIC_MASK)));
|
||||
return ((((magic >> 0U) & ZIP_MAGIC_MASK) == 'P') && (((magic >> ZIP_MAGIC_OFFSET) & ZIP_MAGIC_MASK) == 'K'));
|
||||
}
|
||||
|
||||
int OpenArchive(ZipArchiveHandle &handle, const char *path)
|
||||
|
@ -31,12 +31,12 @@ struct EntryFileStat {
|
||||
public:
|
||||
uint32_t GetUncompressedSize() const
|
||||
{
|
||||
return (uint32_t)file_stat.uncompressed_size;
|
||||
return static_cast<uint32_t>(file_stat.uncompressed_size);
|
||||
}
|
||||
|
||||
uint32_t GetCompressedSize() const
|
||||
{
|
||||
return (uint32_t)file_stat.compressed_size;
|
||||
return static_cast<uint32_t>(file_stat.compressed_size);
|
||||
}
|
||||
|
||||
inline uint32_t GetOffset() const
|
||||
@ -57,7 +57,7 @@ struct GlobalStat {
|
||||
public:
|
||||
uint32_t GetNumberOfEntry() const
|
||||
{
|
||||
return (uint32_t)ginfo.number_entry;
|
||||
return static_cast<uint32_t>(ginfo.number_entry);
|
||||
}
|
||||
unz_global_info ginfo;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user