Mesa (master): u_math.h: fix 64 to 32 bit truncation warning
Emil Velikov
evelikov at kemper.freedesktop.org
Thu Oct 23 14:29:44 UTC 2014
Module: Mesa
Branch: master
Commit: 23080e49c4e209101602ec0630923bc1c7c29689
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=23080e49c4e209101602ec0630923bc1c7c29689
Author: Alon Levy <alevy at redhat.com>
Date: Wed Jul 23 00:07:03 2014 +0300
u_math.h: fix 64 to 32 bit truncation warning
Signed-off-by: Alon Levy <alevy at redhat.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/gallium/auxiliary/util/u_math.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index f95c111..0113fb1 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -799,7 +799,7 @@ util_bswap64(uint64_t n)
#if defined(HAVE___BUILTIN_BSWAP64)
return __builtin_bswap64(n);
#else
- return ((uint64_t)util_bswap32(n) << 32) |
+ return ((uint64_t)util_bswap32((uint32_t)n) << 32) |
util_bswap32((n >> 32));
#endif
}
More information about the mesa-commit
mailing list