From 2a87c646f50a60d09cc67d65754e50e62710e4ad Mon Sep 17 00:00:00 2001 From: Muhammad Awad Date: Thu, 5 Sep 2024 18:39:02 -0500 Subject: [PATCH] Fix bad auto Signed-off-by: Muhammad Awad [ROCm/rocshmem commit: b811b2b683194953aeea29e72964542c2884a891] --- projects/rocshmem/src/backend_type.hpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/projects/rocshmem/src/backend_type.hpp b/projects/rocshmem/src/backend_type.hpp index ad9e992636..ce6ccb64cc 100644 --- a/projects/rocshmem/src/backend_type.hpp +++ b/projects/rocshmem/src/backend_type.hpp @@ -67,13 +67,11 @@ enum class BackendType { RO_BACKEND, GPU_IB_BACKEND }; */ #ifdef USE_GPU_IB #define DISPATCH_RET(Func) \ - auto ret_val{0}; \ - ret_val = static_cast(this)->Func; \ + auto ret_val = static_cast(this)->Func; \ return ret_val; #else #define DISPATCH_RET(Func) \ - auto ret_val{0}; \ - ret_val = static_cast(this)->Func; \ + auto ret_val = static_cast(this)->Func; \ return ret_val; #endif /** @@ -113,13 +111,11 @@ enum class BackendType { RO_BACKEND, GPU_IB_BACKEND }; #ifdef USE_GPU_IB #define HOST_DISPATCH_RET(Func) \ - auto ret_val{0}; \ - ret_val = static_cast(this)->Func; \ + auto ret_val = static_cast(this)->Func; \ return ret_val; #else #define HOST_DISPATCH_RET(Func) \ - auto ret_val{0}; \ - ret_val = static_cast(this)->Func; \ + auto ret_val = static_cast(this)->Func; \ return ret_val; #endif