diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2024-12-16 13:38:09 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2024-12-19 16:17:46 +0100 |
commit | 827f05a53cb831bd54166ee812752ae3cce2b69b (patch) | |
tree | d6c68f39ce0e06384bf1a0e86c847ce1ff2ee9e4 /src/buildtool/execution_api | |
parent | 8fb0006e710e465c9778f0ad9c84e8ad74042960 (diff) | |
download | justbuild-827f05a53cb831bd54166ee812752ae3cce2b69b.tar.gz |
Fix struct member initialization
Diffstat (limited to 'src/buildtool/execution_api')
3 files changed, 7 insertions, 6 deletions
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 <typename TContent> struct RetryProcessBatchResponse { bool ok{false}; - std::vector<TContent> result; + std::vector<TContent> result{}; bool exit_retry_loop{false}; - std::optional<std::string> error_msg; + std::optional<std::string> 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<std::string, bazel_re::Digest> server_logs; - std::string message; + grpc::Status status{}; + std::unordered_map<std::string, bazel_re::Digest> server_logs{}; + std::string message{}; }; struct ExecutionResponse { |