From a7dc6d78022ff36e12386cde80215435b4ad6324 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Mon, 15 Nov 2021 18:50:46 -0600 Subject: [PATCH] Add missing return in ScopeGuard::operator=. This omission did not cause problems earlier due to having not been instanced. Change-Id: I7a54f82e06c299902f3bf6b4d3737cc5e30961ad [ROCm/ROCR-Runtime commit: 322588a60e929c77a340a35d7ed5c0b2986a52e5] --- projects/rocr-runtime/runtime/hsa-runtime/core/util/utils.h | 1 + projects/rocr-runtime/runtime/hsa-runtime/image/util.h | 1 + 2 files changed, 2 insertions(+) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/util/utils.h b/projects/rocr-runtime/runtime/hsa-runtime/core/util/utils.h index 3c95d45452..b1901b6520 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/util/utils.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/util/utils.h @@ -158,6 +158,7 @@ class ScopeGuard { dismiss_ = rhs.dismiss_; release_ = rhs.release_; rhs.dismiss_ = true; + return *this; } __forceinline void Dismiss() { dismiss_ = true; } diff --git a/projects/rocr-runtime/runtime/hsa-runtime/image/util.h b/projects/rocr-runtime/runtime/hsa-runtime/image/util.h index 5eb9f3aabd..8c0faaad83 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/image/util.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/image/util.h @@ -130,6 +130,7 @@ template class ScopeGuard { dismiss_ = rhs.dismiss_; release_ = rhs.release_; rhs.dismiss_ = true; + return *this; } __forceinline void Dismiss() { dismiss_ = true; }