summaryrefslogtreecommitdiff
path: root/src/mesa/main/image.c
diff options
context:
space:
mode:
authorKarl Schultz <karl.w.schultz@gmail.com>2010-02-13 17:31:58 -0700
committerKarl Schultz <karl.w.schultz@gmail.com>2010-02-13 17:34:04 -0700
commitb30898f4ab533085d97a33638ad0a1cf9ddb1d67 (patch)
tree7c27558e2905da625b75060628967d3d52fe6728 /src/mesa/main/image.c
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/image.c')
-rw-r--r--src/mesa/main/image.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 81993e7063..468f2a9b21 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -5662,7 +5662,7 @@ clip_right_or_top(GLint *srcX0, GLint *srcX1,
/* chop off [t, 1] part */
ASSERT(t >= 0.0 && t <= 1.0);
*dstX1 = maxValue;
- bias = (*srcX0 < *srcX1) ? 0.5 : -0.5;
+ bias = (*srcX0 < *srcX1) ? 0.5F : -0.5F;
*srcX1 = *srcX0 + (GLint) (t * (*srcX1 - *srcX0) + bias);
}
else if (*dstX0 > maxValue) {
@@ -5672,7 +5672,7 @@ clip_right_or_top(GLint *srcX0, GLint *srcX1,
/* chop off [t, 1] part */
ASSERT(t >= 0.0 && t <= 1.0);
*dstX0 = maxValue;
- bias = (*srcX0 < *srcX1) ? -0.5 : 0.5;
+ bias = (*srcX0 < *srcX1) ? -0.5F : 0.5F;
*srcX0 = *srcX1 + (GLint) (t * (*srcX0 - *srcX1) + bias);
}
}
@@ -5695,7 +5695,7 @@ clip_left_or_bottom(GLint *srcX0, GLint *srcX1,
/* chop off [0, t] part */
ASSERT(t >= 0.0 && t <= 1.0);
*dstX0 = minValue;
- bias = (*srcX0 < *srcX1) ? 0.5 : -0.5; /* flipped??? */
+ bias = (*srcX0 < *srcX1) ? 0.5F : -0.5F; /* flipped??? */
*srcX0 = *srcX0 + (GLint) (t * (*srcX1 - *srcX0) + bias);
}
else if (*dstX1 < minValue) {
@@ -5705,7 +5705,7 @@ clip_left_or_bottom(GLint *srcX0, GLint *srcX1,
/* chop off [0, t] part */
ASSERT(t >= 0.0 && t <= 1.0);
*dstX1 = minValue;
- bias = (*srcX0 < *srcX1) ? 0.5 : -0.5;
+ bias = (*srcX0 < *srcX1) ? 0.5F : -0.5F;
*srcX1 = *srcX1 + (GLint) (t * (*srcX0 - *srcX1) + bias);
}
}