mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
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:
parent
05c36d67ce
commit
3fdf323e6e
@ -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)
|
||||
{ }
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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) { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user