diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2026-02-24 20:24:17 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2026-02-24 20:24:17 +0000 |
| commit | 5faceb84142f3c9886f38a03dd5214785ac6961f (patch) | |
| tree | 1563dc7debffb0be2c884ec5c97ee4c8c95b9018 | |
| parent | 9063968e8e394b8062a855592e12607b143c1b0f (diff) | |
__builtin_align_down: Cast value to __uintptr_t in the fallback
This matches the behavior of the fallbacks for __builtin_align_up
and __builtin_is_aligned.
Reviewed by: arichardson, ngie, kib
Differential Revision: https://reviews.freebsd.org/D55161
| -rw-r--r-- | sys/sys/cdefs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index ea6a92ad0056..132d4809b0ed 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -649,7 +649,7 @@ #endif #if !__has_builtin(__builtin_align_down) #define __builtin_align_down(x, align) \ - ((__typeof__(x))((x)&(~((align)-1)))) + ((__typeof__(x))((__uintptr_t)(x)&(~((align)-1)))) #endif #define __align_up(x, y) __builtin_align_up(x, y) |
