mmio: fix compiler warnings
We implicitly know that the value range will not exceed access_t despite the integer-based arithmetics, i.e., negation and shift operations. Fixes #1524
This commit is contained in:
parent
140ecb1238
commit
8990346c6c
|
@ -170,12 +170,12 @@ struct Genode::Register
|
|||
/**
|
||||
* Get a mask of this field shifted by its shift in the register
|
||||
*/
|
||||
static constexpr access_t reg_mask() { return mask() << SHIFT; }
|
||||
static constexpr access_t reg_mask() { return (access_t)(mask() << SHIFT); }
|
||||
|
||||
/**
|
||||
* Get the bitwise negation of 'reg_mask'
|
||||
*/
|
||||
static constexpr access_t clear_mask() { return ~reg_mask(); }
|
||||
static constexpr access_t clear_mask() { return (access_t)~reg_mask(); }
|
||||
|
||||
/**
|
||||
* Back reference to containing register
|
||||
|
|
Loading…
Reference in New Issue
Block a user