forked from mindspore-Ecosystem/mindspore
Fix codecheck warnings
This commit is contained in:
parent
683597658a
commit
d96201e5be
|
@ -592,7 +592,7 @@ void DebugServices::CheckWatchpointsForTensor(
|
|||
// in offline mode remove the need for the data
|
||||
tensor.reset();
|
||||
#endif
|
||||
tensor_processed_count_.fetch_add(1, std::memory_order_relaxed);
|
||||
(void)tensor_processed_count_.fetch_add(1, std::memory_order_relaxed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -513,7 +513,7 @@ class DebugServices {
|
|||
|
||||
void CheckWatchpointProgress(size_t tensor_list_size);
|
||||
|
||||
size_t GetProcessedTensorCount() { return tensor_processed_count_; }
|
||||
size_t GetProcessedTensorCount() const { return tensor_processed_count_; }
|
||||
|
||||
private:
|
||||
std::mutex lock_;
|
||||
|
|
|
@ -29,12 +29,16 @@ DbgServices::DbgServices() { debug_services_ = std::make_shared<DebugServices>()
|
|||
DbgServices::DbgServices(const DbgServices &other) {
|
||||
MS_LOG(INFO) << "cpp DbgServices object is created via copy";
|
||||
debug_services_ = other.debug_services_;
|
||||
check_wp_in_progress_ = other.check_wp_in_progress_;
|
||||
total_tensor_count_ = other.total_tensor_count_;
|
||||
}
|
||||
|
||||
DbgServices &DbgServices::operator=(const DbgServices &other) {
|
||||
MS_LOG(INFO) << "cpp DbgServices object is being assigned a different state";
|
||||
if (this != &other) {
|
||||
debug_services_ = other.debug_services_;
|
||||
check_wp_in_progress_ = other.check_wp_in_progress_;
|
||||
total_tensor_count_ = other.total_tensor_count_;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue