From ed40ba05de65b20cfb733f4c5bd49b8af036c8eb Mon Sep 17 00:00:00 2001 From: BowenK Date: Sat, 19 Sep 2020 09:55:02 +0800 Subject: [PATCH] fix static checking warnings --- mindspore/ccsrc/frontend/optimizer/pattern.h | 2 +- mindspore/ccsrc/utils/scoped_long_running.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/mindspore/ccsrc/frontend/optimizer/pattern.h b/mindspore/ccsrc/frontend/optimizer/pattern.h index 452258ff94..e4282e6ccd 100644 --- a/mindspore/ccsrc/frontend/optimizer/pattern.h +++ b/mindspore/ccsrc/frontend/optimizer/pattern.h @@ -259,7 +259,7 @@ class MatchResult { MatchResult() {} ~MatchResult() = default; void add_entry(PatternPtr pattern, AnfNodePtr node) { match_result_[pattern] = node; } - PatternNodeMap &result() { return match_result_; } + const PatternNodeMap &result() { return match_result_; } AnfNodePtr get_node(const PatternPtr &pattern); void merge(const MatchResultPtr &other_result); void clear() { match_result_.clear(); } diff --git a/mindspore/ccsrc/utils/scoped_long_running.h b/mindspore/ccsrc/utils/scoped_long_running.h index b986c8f8c9..d81592d7d8 100644 --- a/mindspore/ccsrc/utils/scoped_long_running.h +++ b/mindspore/ccsrc/utils/scoped_long_running.h @@ -21,7 +21,6 @@ #include namespace mindspore { - // Base Class for scoped long running code. // Enter() should release some global resoure, like Python GIL; // Leave() should acquire the same global resource released.