mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-12 06:53:11 +02:00
refactor: Enable clang-tidy bugprone-unused-return-value
This requires some small refactors to silence false-positive warnings. Also, expand the bugprone-unused-return-value.CheckedReturnTypes option to include util::Result, and util::Expected.
This commit is contained in:
@@ -899,8 +899,7 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co
|
||||
throw CConnectionFailed("uri-encode failed");
|
||||
}
|
||||
}
|
||||
int r = evhttp_make_request(evcon.get(), req.get(), EVHTTP_REQ_POST, endpoint.c_str());
|
||||
req.release(); // ownership moved to evcon in above call
|
||||
int r = evhttp_make_request(evcon.get(), req.release(), EVHTTP_REQ_POST, endpoint.c_str());
|
||||
if (r != 0) {
|
||||
throw CConnectionFailed("send http request failed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user