os: Drop unused Net::Dhcp_client::_alloc member.

Not used for anything so technically a dead code. Clang 11 complains
about this.

Issue #3984
This commit is contained in:
Piotr Tworek 2020-11-16 00:47:02 +01:00 committed by Norman Feske
parent 05c36d67ce
commit 3fdf323e6e
3 changed files with 7 additions and 11 deletions

View File

@ -53,11 +53,10 @@ Configuration &Dhcp_client::_config() { return _domain().config(); };
Domain &Dhcp_client::_domain() { return _interface.domain(); }
Dhcp_client::Dhcp_client(Genode::Allocator &alloc,
Timer::Connection &timer,
Dhcp_client::Dhcp_client(Timer::Connection &timer,
Interface &interface)
:
_alloc(alloc), _interface(interface),
_interface(interface),
_timeout(timer, *this, &Dhcp_client::_handle_timeout)
{ }

View File

@ -16,7 +16,6 @@
/* Genode includes */
#include <timer_session/connection.h>
#include <base/allocator.h>
#include <net/dhcp.h>
namespace Net {
@ -37,7 +36,6 @@ class Net::Dhcp_client
INIT = 0, SELECT = 1, REQUEST = 2, BOUND = 3, RENEW = 4, REBIND = 5
};
Genode::Allocator &_alloc;
Interface &_interface;
State _state { State::INIT };
Timer::One_shot_timeout<Dhcp_client> _timeout;
@ -62,8 +60,7 @@ class Net::Dhcp_client
public:
Dhcp_client(Genode::Allocator &alloc,
Timer::Connection &timer,
Dhcp_client(Timer::Connection &timer,
Interface &interface);
void handle_dhcp_reply(Dhcp_packet &dhcp);

View File

@ -377,7 +377,7 @@ void Interface::attach_to_domain()
/* construct DHCP client if the new domain needs it */
if (domain.ip_config_dynamic()) {
_dhcp_client.construct(_alloc, _timer, *this);
_dhcp_client.construct(_timer, *this);
}
attach_to_domain_finish();
}
@ -2020,7 +2020,7 @@ void Interface::handle_config_2()
_dhcp_client.destruct();
}
if (new_domain.ip_config_dynamic()) {
_dhcp_client.construct(_alloc, _timer, *this);
_dhcp_client.construct(_timer, *this);
}
return;
}
@ -2035,7 +2035,7 @@ void Interface::handle_config_2()
if (!old_domain.ip_config_dynamic() &&
new_domain.ip_config_dynamic())
{
_dhcp_client.construct(_alloc, _timer, *this);
_dhcp_client.construct(_timer, *this);
}
/* remember that the interface stays attached to the same domain */
@ -2062,7 +2062,7 @@ void Interface::handle_config_2()
/* construct DHCP client if the new domain needs it */
if (new_domain.ip_config_dynamic()) {
_dhcp_client.construct(_alloc, _timer, *this);
_dhcp_client.construct(_timer, *this);
}
}
catch (Domain_tree::No_match) { }