diff options
Diffstat (limited to 'runtime/utils.h')
| -rw-r--r-- | runtime/utils.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/utils.h b/runtime/utils.h index b47de81d62..2ea4953f2a 100644 --- a/runtime/utils.h +++ b/runtime/utils.h @@ -167,8 +167,7 @@ struct TypeIdentity { // For rounding integers. template<typename T> -static constexpr T RoundDown(T x, typename TypeIdentity<T>::type n) - __attribute__((warn_unused_result)); +static constexpr T RoundDown(T x, typename TypeIdentity<T>::type n) WARN_UNUSED; template<typename T> static constexpr T RoundDown(T x, typename TypeIdentity<T>::type n) { @@ -178,8 +177,7 @@ static constexpr T RoundDown(T x, typename TypeIdentity<T>::type n) { } template<typename T> -static constexpr T RoundUp(T x, typename TypeIdentity<T>::type n) - __attribute__((warn_unused_result)); +static constexpr T RoundUp(T x, typename TypeIdentity<T>::type n) WARN_UNUSED; template<typename T> static constexpr T RoundUp(T x, typename TypeIdentity<T>::type n) { @@ -188,7 +186,7 @@ static constexpr T RoundUp(T x, typename TypeIdentity<T>::type n) { // For aligning pointers. template<typename T> -static inline T* AlignDown(T* x, uintptr_t n) __attribute__((warn_unused_result)); +static inline T* AlignDown(T* x, uintptr_t n) WARN_UNUSED; template<typename T> static inline T* AlignDown(T* x, uintptr_t n) { @@ -196,7 +194,7 @@ static inline T* AlignDown(T* x, uintptr_t n) { } template<typename T> -static inline T* AlignUp(T* x, uintptr_t n) __attribute__((warn_unused_result)); +static inline T* AlignUp(T* x, uintptr_t n) WARN_UNUSED; template<typename T> static inline T* AlignUp(T* x, uintptr_t n) { |