Skip to content

Commit 27fd8af

Browse files
misc: removed some dead code
1 parent 1b7b646 commit 27fd8af

2 files changed

Lines changed: 5 additions & 14 deletions

File tree

api/util/detail/alloc_pmr.hpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -272,19 +272,10 @@ namespace os::mem {
272272
throw std::bad_alloc();
273273
}
274274

275-
try
276-
{
277-
void* buf = pool_->allocate(size, align);
278-
used += size;
279-
allocs++;
280-
return buf;
281-
}
282-
catch(const std::bad_alloc&)
283-
{
284-
//printf("Pool returned bad alloc, resource: used=%zu reported_cap=%zu allocatable=%zu\n",
285-
// used, cap, allocatable());
286-
throw;
287-
}
275+
void* buf = pool_->allocate(size, align);
276+
used += size;
277+
allocs++;
278+
return buf;
288279
}
289280

290281
void Pmr_resource::do_deallocate(void* ptr, std::size_t s, std::size_t a) {

lib/microLB/micro_lb/balancer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ namespace microLB
368368
{
369369
outgoing = this->stack.tcp().connect(this->addr);
370370
}
371-
catch(const net::TCP_error& err)
371+
catch([[maybe_unused]]const net::TCP_error& err)
372372
{
373373
LBOUT("Got exception: %s\n", err.what());
374374
this->restart_active_check();

0 commit comments

Comments
 (0)