init: fix constness-related warnings by gcc 6.3

Fixes #2374
This commit is contained in:
Norman Feske
2017-04-24 11:25:54 +02:00
committed by Christian Helmuth
parent 4f19e4b6af
commit 9a6c194432
4 changed files with 7 additions and 7 deletions

View File

@@ -75,6 +75,11 @@ class Genode::Session_requester
*/ */
Id_space<Parent::Server> &id_space() { return _id_space; } Id_space<Parent::Server> &id_space() { return _id_space; }
/**
* Non-modifiable ID space for sessios requests supplied to the child
*/
Id_space<Parent::Server> const &id_space() const { return _id_space; }
/** /**
* ROM service providing a single "session_requests" session * ROM service providing a single "session_requests" session
*/ */

View File

@@ -18,8 +18,6 @@
Init::Child::Apply_config_result Init::Child::Apply_config_result
Init::Child::apply_config(Xml_node start_node) Init::Child::apply_config(Xml_node start_node)
{ {
Child_policy &policy = *this;
if (_state == STATE_ABANDONED) if (_state == STATE_ABANDONED)
return NO_SIDE_EFFECTS; return NO_SIDE_EFFECTS;
@@ -319,7 +317,7 @@ void Init::Child::report_state(Xml_generator &xml, Report_detail const &detail)
xml.node("session", [&] () { xml.node("session", [&] () {
session.generate_server_side_info(xml, session_detail); }); }; session.generate_server_side_info(xml, session_detail); }); };
server_id_space().for_each<Session_state const>(fn); _session_requester.id_space().for_each<Session_state const>(fn);
}); });
} }
}); });

View File

@@ -312,7 +312,7 @@ class Init::Child : Child_policy, Child_service::Wakeup
/** /**
* Return true if service is provided by this child * Return true if service is provided by this child
*/ */
bool _provided_by_this(Routed_service const &service) bool _provided_by_this(Routed_service const &service) const
{ {
return service.has_id_space(_session_requester.id_space()); return service.has_id_space(_session_requester.id_space());
} }

View File

@@ -2,6 +2,3 @@ TARGET = init
SRC_CC = main.cc child.cc server.cc SRC_CC = main.cc child.cc server.cc
LIBS = base LIBS = base
INC_DIR += $(PRG_DIR) INC_DIR += $(PRG_DIR)
# workaround for constness issues
CC_OPT += -fpermissive