!23874 Clean pclint and codedex warning

Merge pull request !23874 from Margaret_wangrui/pclint_clean
This commit is contained in:
i-robot 2021-09-22 19:09:18 +00:00 committed by Gitee
commit eaf3837a6a
3 changed files with 7 additions and 6 deletions

View File

@ -389,8 +389,8 @@ bool DumpJsonParser::IsDumpIter(uint32_t iteration) const {
std::string temp = iteration_.substr(IntToSize(start), IntToSize(end - start));
int range_idx = temp.find("-");
if (range_idx != -1) {
uint32_t low_range = std::stoul(temp.substr(0, IntToSize(range_idx)));
uint32_t high_range = std::stoul(temp.substr(IntToSize(range_idx + 1), -1));
uint32_t low_range = static_cast<uint32_t>(std::stoul(temp.substr(0, IntToSize(range_idx))));
uint32_t high_range = static_cast<uint32_t>(std::stoul(temp.substr(IntToSize(range_idx + 1), -1)));
if ((low_range <= iteration) && (iteration <= high_range)) {
return true;
}
@ -403,8 +403,8 @@ bool DumpJsonParser::IsDumpIter(uint32_t iteration) const {
std::string temp = iteration_.substr(IntToSize(start), IntToSize(end - start));
int range_idx = temp.find("-");
if (range_idx != -1) {
uint32_t low_range = std::stoul(temp.substr(0, IntToSize(range_idx)));
uint32_t high_range = std::stoul(temp.substr((range_idx + 1), -1));
uint32_t low_range = static_cast<uint32_t>(std::stoul(temp.substr(0, IntToSize(range_idx))));
uint32_t high_range = static_cast<uint32_t>(std::stoul(temp.substr(IntToSize(range_idx + 1), -1)));
if ((low_range <= iteration) && (iteration <= high_range)) {
return true;
}

View File

@ -103,7 +103,8 @@ enum TailType { kGradAll, kGradFirst, kNotGrad };
class Tail : public MetaFuncGraph {
public:
explicit Tail(const std::string &name, TailType tail_type = kNotGrad) : MetaFuncGraph(name), tail_type_(tail_type) {}
explicit Tail(const std::string &name, TailType tail_type = kNotGrad)
: MetaFuncGraph(name), tail_type_(tail_type), enable_tuple_grad_(false) {}
~Tail() override = default;
MS_DECLARE_PARENT(Tail, MetaFuncGraph)

View File

@ -1009,7 +1009,7 @@ bool SetMindIRGraphAction(const ResourcePtr &res) {
broaded_args.push_back(abs_ref);
}
}
auto result = AbstractAnalyze(res, res->func_graph(), broaded_args, true);
(void)AbstractAnalyze(res, res->func_graph(), broaded_args, true);
auto it = abstract::AnalysisResultCacheMgr::GetInstance().begin();
auto it_end = abstract::AnalysisResultCacheMgr::GetInstance().end();
for (; it != it_end; ++it) {