mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 07:38:28 +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:
@ -35,8 +35,22 @@ namespace Genode {
|
||||
|
||||
/**
|
||||
* Return the interface to the component's environment
|
||||
*
|
||||
* \noapi
|
||||
* \deprecated
|
||||
*/
|
||||
extern Env_deprecated *env();
|
||||
extern Env_deprecated *env_deprecated();
|
||||
|
||||
/**
|
||||
* Return the interface to the component's environment
|
||||
*
|
||||
* \deprecated
|
||||
*/
|
||||
static inline Env_deprecated *env() __attribute__((deprecated));
|
||||
static inline Env_deprecated *env()
|
||||
{
|
||||
return env_deprecated();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user