Skip to content

Commit 757a65f

Browse files
Update src/Common/ZooKeeper/ZooKeeper.cpp
Co-authored-by: Yakov Olkhovskiy <[email protected]>
1 parent 4fea3db commit 757a65f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Common/ZooKeeper/ZooKeeper.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -771,15 +771,13 @@ ZooKeeper::multiImpl(const Coordination::Requests & requests, Coordination::Resp
771771

772772
if (future_result.wait_for(std::chrono::milliseconds(args.operation_timeout_ms)) != std::future_status::ready)
773773
{
774-
#pragma clang diagnostic push
775-
#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
774+
auto & request = *requests[0];
776775
impl->finalize(fmt::format(
777776
"Operation timeout on {} of {} requests. First ({}): {}",
778777
Coordination::OpNum::Multi,
779778
requests.size(),
780-
demangle(typeid(*requests[0]).name()),
781-
requests[0]->getPath()));
782-
#pragma clang diagnostic pop
779+
demangle(typeid(request).name()),
780+
request.getPath()));
783781
return {Coordination::Error::ZOPERATIONTIMEOUT, ""};
784782
}
785783

0 commit comments

Comments
 (0)