From 827f05a53cb831bd54166ee812752ae3cce2b69b Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Mon, 16 Dec 2024 13:38:09 +0100 Subject: Fix struct member initialization --- src/buildtool/execution_api/remote/bazel/bazel_action.cpp | 3 ++- src/buildtool/execution_api/remote/bazel/bazel_cas_client.hpp | 4 ++-- src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/buildtool/execution_api/remote') diff --git a/src/buildtool/execution_api/remote/bazel/bazel_action.cpp b/src/buildtool/execution_api/remote/bazel/bazel_action.cpp index 62df5b6a..17ad10a2 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_action.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_action.cpp @@ -101,7 +101,8 @@ auto BazelAction::Execute(Logger const* logger) noexcept logger, action->hash(), network_, - BazelExecutionClient::ExecutionOutput{*result, true}); + BazelExecutionClient::ExecutionOutput{ + .action_result = *result, .cached_result = true}); } } } diff --git a/src/buildtool/execution_api/remote/bazel/bazel_cas_client.hpp b/src/buildtool/execution_api/remote/bazel/bazel_cas_client.hpp index 69e575e5..eca24d9c 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_cas_client.hpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_cas_client.hpp @@ -189,9 +189,9 @@ class BazelCasClient { template struct RetryProcessBatchResponse { bool ok{false}; - std::vector result; + std::vector result{}; bool exit_retry_loop{false}; - std::optional error_msg; + std::optional error_msg{}; }; // If this function is defined in the .cpp file, clang raises an error diff --git a/src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp b/src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp index 889ca7a3..872ab110 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp @@ -41,9 +41,9 @@ class BazelExecutionClient { struct ExecutionOutput { bazel_re::ActionResult action_result; bool cached_result{}; - grpc::Status status; - std::unordered_map server_logs; - std::string message; + grpc::Status status{}; + std::unordered_map server_logs{}; + std::string message{}; }; struct ExecutionResponse { -- cgit v1.2.3