From ec7d0efddfe68d9db04c6973d96592ba3deec60a Mon Sep 17 00:00:00 2001 From: Piotr Tworek Date: Wed, 4 Nov 2020 13:01:32 +0100 Subject: [PATCH] os: Drop unused Net::Dhcp_client::_alloc member. This reference member is not used anywhere in the code. This prompts clang to complain about it. Eliminate the member and all the plumbing associated with it to silence the warning. Issue #4421 --- repos/os/src/app/ping/dhcp_client.cc | 4 +--- repos/os/src/app/ping/dhcp_client.h | 4 +--- repos/os/src/app/ping/main.cc | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/repos/os/src/app/ping/dhcp_client.cc b/repos/os/src/app/ping/dhcp_client.cc index b9daa5cf9f..b32d603689 100644 --- a/repos/os/src/app/ping/dhcp_client.cc +++ b/repos/os/src/app/ping/dhcp_client.cc @@ -51,12 +51,10 @@ void append_param_req_list(Dhcp_options &dhcp_opts) ** Dhcp_client ** *****************/ -Dhcp_client::Dhcp_client(Genode::Allocator &alloc, - Timer::Connection &timer, +Dhcp_client::Dhcp_client(Timer::Connection &timer, Nic &nic, Dhcp_client_handler &handler) : - _alloc (alloc), _timeout (timer, *this, &Dhcp_client::_handle_timeout), _nic (nic), _handler (handler) diff --git a/repos/os/src/app/ping/dhcp_client.h b/repos/os/src/app/ping/dhcp_client.h index e1bbd2ee9c..4df8f6cedb 100644 --- a/repos/os/src/app/ping/dhcp_client.h +++ b/repos/os/src/app/ping/dhcp_client.h @@ -64,7 +64,6 @@ class Net::Dhcp_client enum { DISCOVER_TIMEOUT_SEC = 2 }; enum { REQUEST_TIMEOUT_SEC = 2 }; - Genode::Allocator &_alloc; State _state { State::INIT }; Timer::One_shot_timeout _timeout; unsigned long _lease_time_sec = 0; @@ -92,8 +91,7 @@ class Net::Dhcp_client public: - Dhcp_client(Genode::Allocator &alloc, - Timer::Connection &timer, + Dhcp_client(Timer::Connection &timer, Nic &nic, Dhcp_client_handler &handler); diff --git a/repos/os/src/app/ping/main.cc b/repos/os/src/app/ping/main.cc index 3e830c311a..48b323611a 100644 --- a/repos/os/src/app/ping/main.cc +++ b/repos/os/src/app/ping/main.cc @@ -153,7 +153,7 @@ Main::Main(Env &env) : _env(env) /* else, start the DHCP client for requesting an IP config */ else { - _dhcp_client.construct(_heap, _timer, _nic, *this); } + _dhcp_client.construct(_timer, _nic, *this); } }