mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-15 05:38:18 +00:00
Warn about the use of deprecated env() function
This patch enables warnings if one of the deprecate functions that rely in the implicit use of the global Genode::env() accessor are called. For the time being, some places within the base framework continue to rely on the global function while omitting the warning by calling 'env_deprecated' instead of 'env'. Issue #1987
This commit is contained in:
@ -78,8 +78,9 @@ class Genode::Attached_rom_dataspace
|
||||
* \deprecated Use the constructor with 'Env &' as first
|
||||
* argument instead
|
||||
*/
|
||||
Attached_rom_dataspace(char const *name)
|
||||
: _rm(*env()->rm_session()), _rom(name) { _try_attach(); }
|
||||
Attached_rom_dataspace(char const *name) __attribute__((deprecated))
|
||||
: _rm(*env_deprecated()->rm_session()), _rom(false /* deprecated */, name)
|
||||
{ _try_attach(); }
|
||||
|
||||
/**
|
||||
* Return capability of the used dataspace
|
||||
|
Reference in New Issue
Block a user