Module: Mesa
Branch: main
Commit: 0482153ef6218fd46305c0b3fdcc160d2d401d5a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0482153ef6218fd46305c0b3fdcc160d2d401d5a

Author: Yonggang Luo <luoyongg...@gmail.com>
Date:   Sat Dec  9 03:22:52 2023 +0800

util: Update ALIGN prototype to match align

This is for rename merge ALIGN into align in future

Now it's safe to do that, because all warnings that triggered with
clang -Wshorten-64-to-32
already fixed in previous version

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10269

Signed-off-by: Yonggang Luo <luoyongg...@gmail.com>
Reviewed-by: Marek Olšák <marek.ol...@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>

---

 src/util/u_math.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/u_math.h b/src/util/u_math.h
index 208183d4069..c51352fcdc4 100644
--- a/src/util/u_math.h
+++ b/src/util/u_math.h
@@ -633,8 +633,8 @@ util_memcpy_cpu_to_le32(void * restrict dest, const void * 
restrict src, size_t
 #if defined(ALIGN)
 #undef ALIGN
 #endif
-static inline uintptr_t
-ALIGN(uintptr_t value, int32_t alignment)
+static inline uint32_t
+ALIGN(uint32_t value, uint32_t alignment)
 {
    assert(util_is_power_of_two_nonzero(alignment));
    return ALIGN_POT(value, alignment);

Reply via email to