Clang: remove unused

This commit is contained in:
Ehmry - 2019-09-06 11:41:34 +02:00
parent 2dc6ea2042
commit c770a8b9ec
11 changed files with 16 additions and 19 deletions

View File

@ -34,10 +34,7 @@ class Genode::Native_pd_component : public Rpc_object<Linux_native_pd,
enum { ROOT_PATH_MAX_LEN = 512 };
Pd_session_component &_pd_session;
char _root[ROOT_PATH_MAX_LEN];
unsigned long _pid = 0;
unsigned _uid = 0;
unsigned _gid = 0;
void _start(Dataspace_component &ds);

View File

@ -183,7 +183,6 @@ namespace {
typedef Genode::size_t size_t;
msghdr _msg { };
sockaddr_un _addr { };
iovec _iovec { };
char _cmsg_buf[CMSG_SPACE(MAX_SDS_PER_MSG*sizeof(int))];

View File

@ -254,9 +254,16 @@ class Genode::Child : protected Rpc_object<Parent>,
struct Initial_thread : Initial_thread_base
{
protected:
/*
* not used on all platfroms, marked as
* protected to suppress warnings
*/
Cpu_session &_cpu;
private:
Cpu_session &_cpu;
Thread_capability _cap;
public:

View File

@ -133,7 +133,7 @@ namespace Genode {
_marshal_args(call_buf, args);
{
Trace::Rpc_call trace_event(IF::name(), call_buf);
Trace::Rpc_call(IF::name(), call_buf);
}
/* perform RPC, unmarshal return value */
@ -146,7 +146,7 @@ namespace Genode {
Ipc_unmarshaller unmarshaller(reply_buf);
{
Trace::Rpc_returned trace_event(IF::name(), reply_buf);
Trace::Rpc_returned(IF::name(), reply_buf);
}
/* unmarshal RPC output arguments */

View File

@ -99,7 +99,7 @@ class Genode::Rpc_dispatcher : public RPC_INTERFACE
}
template <typename ARG>
ARG _read_arg(Ipc_unmarshaller &msg, Rpc_arg_out)
ARG _read_arg(Ipc_unmarshaller &, Rpc_arg_out)
{
return ARG();
}

View File

@ -172,7 +172,6 @@ class Genode::Xml_generator
bool _has_content = false;
bool _is_indented = false;
bool _has_attributes = false;
/**
* Cursor position of next attribute to insert

View File

@ -41,7 +41,6 @@ class Genode::Trace::Session_component
Allocator_guard _md_alloc;
Tslab<Trace::Subject, 4096> _subjects_slab;
Tslab<Trace::Policy, 4096> _policies_slab;
unsigned const _parent_levels;
Session_label const _label;
Source_registry &_sources;
Policy_registry &_policies;

View File

@ -309,7 +309,6 @@ class Genode::Trace::Subject_registry
typedef List<Subject> Subjects;
Allocator &_md_alloc;
Ram_allocator &_ram;
Source_registry &_sources;
unsigned _id_cnt { 0 };
Lock _lock { };
@ -396,10 +395,10 @@ class Genode::Trace::Subject_registry
* \param ram allocator used for the allocation of trace
* buffers and policy dataspaces.
*/
Subject_registry(Allocator &md_alloc, Ram_allocator &ram,
Subject_registry(Allocator &md_alloc, Ram_allocator&,
Source_registry &sources)
:
_md_alloc(md_alloc), _ram(ram), _sources(sources)
_md_alloc(md_alloc), _sources(sources)
{ }
/**

View File

@ -148,7 +148,7 @@ void Session_component::free(Subject_id subject_id)
Session_component::Session_component(Ram_allocator &ram, Region_map &local_rm,
Allocator &md_alloc, size_t ram_quota,
size_t arg_buffer_size, unsigned parent_levels,
size_t arg_buffer_size, unsigned /*parent_levels*/,
char const *label, Source_registry &sources,
Policy_registry &policies)
:
@ -156,7 +156,6 @@ Session_component::Session_component(Ram_allocator &ram, Region_map &local_rm,
_md_alloc(&md_alloc, ram_quota),
_subjects_slab(&_md_alloc),
_policies_slab(&_md_alloc),
_parent_levels(parent_levels),
_label(label),
_sources(sources),
_policies(policies),

View File

@ -98,7 +98,7 @@ extern "C" void init_main_thread()
* Explicitly setup program environment at this point to ensure that its
* destructor won't be registered for the atexit routine.
*/
(void*)env_deprecated();
(void)env_deprecated();
init_log(*env_deprecated()->parent());
init_exit(*env_deprecated()->parent());

View File

@ -20,9 +20,7 @@ using namespace Genode;
bool Net::dynamic_port(Port const port)
{
return port.value >= (unsigned)Port_allocator::FIRST &&
port.value < (unsigned)Port_allocator::FIRST +
Port_allocator::COUNT;
return port.value >= (unsigned)Port_allocator::FIRST;
}