diff --git a/common/include/compiler-poison.h b/common/include/compiler-poison.h index c6f7c2c02..92c0c5974 100644 --- a/common/include/compiler-poison.h +++ b/common/include/compiler-poison.h @@ -103,8 +103,8 @@ static inline void DXX_POISON_DEFINED_MEMORY(T b, unsigned long l, const V &v) /* Poison a memory range, then mark it unreadable. */ -template -static inline void DXX_POISON_MEMORY(T b, unsigned long l, const V &v) +template +static inline void DXX_POISON_MEMORY(T b, unsigned long l, const uint8_t v) { DXX_POISON_DEFINED_MEMORY(b, l, v); DXX_MAKE_MEM_UNDEFINED(b, l); @@ -113,8 +113,8 @@ static inline void DXX_POISON_MEMORY(T b, unsigned long l, const V &v) /* Convenience function to invoke * `DXX_POISON_MEMORY(T &, unsigned long, V)` */ -template -static inline void DXX_POISON_MEMORY(T b, T e, const V &v) +template +static inline void DXX_POISON_MEMORY(T b, T e, const uint8_t &&v) { DXX_POISON_MEMORY_RANGE(b, e, v); DXX_MAKE_MEM_UNDEFINED(b, e); @@ -125,7 +125,7 @@ static inline void DXX_POISON_MEMORY(T b, T e, const V &v) * of `T`. */ template -static inline void DXX_POISON_VAR(T &b, const unsigned char v) +static inline void DXX_POISON_VAR(T &b, const uint8_t v) { DXX_POISON_MEMORY(reinterpret_cast(std::addressof(b)), sizeof(T), v); }