aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/macros.h
diff options
context:
space:
mode:
authorKarl Schultz <[email protected]>2010-02-13 17:31:58 -0700
committerKarl Schultz <[email protected]>2010-02-13 17:34:04 -0700
commitb30898f4ab533085d97a33638ad0a1cf9ddb1d67 (patch)
tree7c27558e2905da625b75060628967d3d52fe6728 /src/mesa/main/macros.h
parent5fd2b46a20321d8600d6256bff17ec3ebc9cb510 (diff)
mesa: Fix compiler warnings
Add explicit casts, fix constant types, fix variable types. Fixes about 340 warnings in MSFT Visual Studio.
Diffstat (limited to 'src/mesa/main/macros.h')
-rw-r--r--src/mesa/main/macros.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 55578adf836..38a97fdb18c 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -83,14 +83,14 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256];
/** Convert GLuint in [0,4294967295] to GLfloat in [0.0,1.0] */
-#define UINT_TO_FLOAT(U) ((GLfloat) (U) * (1.0F / 4294967295.0))
+#define UINT_TO_FLOAT(U) ((GLfloat) ((U) * (1.0F / 4294967295.0)))
/** Convert GLfloat in [0.0,1.0] to GLuint in [0,4294967295] */
#define FLOAT_TO_UINT(X) ((GLuint) ((X) * 4294967295.0))
/** Convert GLint in [-2147483648,2147483647] to GLfloat in [-1.0,1.0] */
-#define INT_TO_FLOAT(I) ((2.0F * (I) + 1.0F) * (1.0F/4294967294.0))
+#define INT_TO_FLOAT(I) ((GLfloat) ((2.0F * (I) + 1.0F) * (1.0F/4294967294.0)))
/** Convert GLfloat in [-1.0,1.0] to GLint in [-2147483648,2147483647] */
/* causes overflow: