diff options
author | Michal Krol <michal@vmware.com> | 2009-12-23 17:02:42 +0100 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2009-12-23 17:02:42 +0100 |
commit | f1aff18b6a14fd21780296323806518085ec3867 (patch) | |
tree | f5c3bd8d218928c5c131ef4040ff177773788048 | |
parent | ec259e9b62887647a6ddbd381929b316058fadee (diff) |
util/math: Add explicit casts to silence compiler warnings.
-rw-r--r-- | src/gallium/auxiliary/util/u_math.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index 81aeb83cbb..c40a2a0042 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -586,12 +586,12 @@ do { \ static INLINE uint32_t util_unsigned_fixed(float value, unsigned frac_bits) { value *= (1<<frac_bits); - return value < 0 ? 0 : value; + return value < 0 ? 0 : (uint32_t)value; } static INLINE int32_t util_signed_fixed(float value, unsigned frac_bits) { - return value * (1<<frac_bits); + return (int32_t)(value * (1<<frac_bits)); } |