mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
Warn on redundant call to exec_static_constructors()
This commit is contained in:
parent
b3791fabc2
commit
92edcb17e5
@ -653,6 +653,10 @@ void Genode::init_ldso_phdr(Env &env)
|
||||
|
||||
void Genode::exec_static_constructors()
|
||||
{
|
||||
if (!binary_ptr->static_construction_pending())
|
||||
warning("Don't call Genode::Env::exec_static_constructors() "
|
||||
"in components without static globals");
|
||||
|
||||
binary_ptr->finish_static_construction();
|
||||
}
|
||||
|
||||
|
@ -504,8 +504,5 @@ struct Nitlog::Main
|
||||
|
||||
void Component::construct(Genode::Env &env)
|
||||
{
|
||||
/* XXX execute constructors of global statics */
|
||||
env.exec_static_constructors();
|
||||
|
||||
static Nitlog::Main main(env);
|
||||
}
|
||||
|
@ -579,8 +579,5 @@ void Nitpicker::Main::_handle_fb_mode()
|
||||
|
||||
void Component::construct(Genode::Env &env)
|
||||
{
|
||||
/* XXX execute constructors of global statics */
|
||||
env.exec_static_constructors();
|
||||
|
||||
static Nitpicker::Main nitpicker(env);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user