Set bugprone-unused-return-value.AllowCastToVoid

It only makes sense to turn this off with C++26, which introduces the _
placeholder.
This commit is contained in:
MarcoFalke
2025-12-09 08:24:42 +01:00
parent cca113f5b0
commit fad4a9fe2b
5 changed files with 6 additions and 6 deletions

View File

@@ -330,7 +330,7 @@ static void http_request_cb(struct evhttp_request* req, void* arg)
std::unique_ptr<HTTPWorkItem> item(new HTTPWorkItem(std::move(hreq), path, i->handler));
assert(g_work_queue);
if (g_work_queue->Enqueue(item.get())) {
[[maybe_unused]] auto _{item.release()}; /* if true, queue took ownership */
(void)item.release(); /* if true, queue took ownership */
} else {
LogWarning("Request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting");
item->req->WriteReply(HTTP_SERVICE_UNAVAILABLE, "Work queue depth exceeded");