mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 07:08:18 +00:00
Warn on redundant call to exec_static_constructors()
This commit is contained in:
@ -653,6 +653,10 @@ void Genode::init_ldso_phdr(Env &env)
|
|||||||
|
|
||||||
void Genode::exec_static_constructors()
|
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();
|
binary_ptr->finish_static_construction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,8 +504,5 @@ struct Nitlog::Main
|
|||||||
|
|
||||||
void Component::construct(Genode::Env &env)
|
void Component::construct(Genode::Env &env)
|
||||||
{
|
{
|
||||||
/* XXX execute constructors of global statics */
|
|
||||||
env.exec_static_constructors();
|
|
||||||
|
|
||||||
static Nitlog::Main main(env);
|
static Nitlog::Main main(env);
|
||||||
}
|
}
|
||||||
|
@ -579,8 +579,5 @@ void Nitpicker::Main::_handle_fb_mode()
|
|||||||
|
|
||||||
void Component::construct(Genode::Env &env)
|
void Component::construct(Genode::Env &env)
|
||||||
{
|
{
|
||||||
/* XXX execute constructors of global statics */
|
|
||||||
env.exec_static_constructors();
|
|
||||||
|
|
||||||
static Nitpicker::Main nitpicker(env);
|
static Nitpicker::Main nitpicker(env);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user