diff --git a/mindspore/ccsrc/debug/data_dump/dump_json_parser.cc b/mindspore/ccsrc/debug/data_dump/dump_json_parser.cc index eabdab86e32..b558ab04456 100644 --- a/mindspore/ccsrc/debug/data_dump/dump_json_parser.cc +++ b/mindspore/ccsrc/debug/data_dump/dump_json_parser.cc @@ -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(std::stoul(temp.substr(0, IntToSize(range_idx)))); + uint32_t high_range = static_cast(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(std::stoul(temp.substr(0, IntToSize(range_idx)))); + uint32_t high_range = static_cast(std::stoul(temp.substr(IntToSize(range_idx + 1), -1))); if ((low_range <= iteration) && (iteration <= high_range)) { return true; } diff --git a/mindspore/ccsrc/frontend/operator/composite/composite.h b/mindspore/ccsrc/frontend/operator/composite/composite.h index 38e7c8f6b65..7543a775eb7 100644 --- a/mindspore/ccsrc/frontend/operator/composite/composite.h +++ b/mindspore/ccsrc/frontend/operator/composite/composite.h @@ -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) diff --git a/mindspore/ccsrc/pipeline/jit/action.cc b/mindspore/ccsrc/pipeline/jit/action.cc index cc796cd917a..61b50363de5 100644 --- a/mindspore/ccsrc/pipeline/jit/action.cc +++ b/mindspore/ccsrc/pipeline/jit/action.cc @@ -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) {