summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2003-12-05 11:25:15 +0000
committerAlan Hourihane <[email protected]>2003-12-05 11:25:15 +0000
commita87bf1599c970a61a56f6271e2fb0b107c299893 (patch)
tree73231334a9c39aeaf47883d34a4558cfd0af41ef /src/mesa
parentc0b0b1790a1a055013ae43be534d449a9167daa8 (diff)
fix compiler warning
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/imports.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 3ca91fb15b7..f8fa835394a 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -540,7 +540,7 @@ _mesa_float_to_half(float val)
const int flt_m = flt & 0x7fffff;
const int flt_e = (flt >> 23) & 0xff;
const int flt_s = (flt >> 31) & 0x1;
- int s, e, m;
+ int s, e, m = 0;
GLhalfNV result;
/* sign bit */
@@ -549,17 +549,17 @@ _mesa_float_to_half(float val)
/* handle special cases */
if ((flt_e == 0) && (flt_m == 0)) {
/* zero */
- m = 0;
+ /* m = 0; - already set */
e = 0;
}
else if ((flt_e == 0) && (flt_m != 0)) {
/* denorm -- denorm float maps to 0 half */
- m = 0;
+ /* m = 0; - already set */
e = 0;
}
else if ((flt_e == 0xff) && (flt_m == 0)) {
/* infinity */
- m = 0;
+ /* m = 0; - already set */
e = 31;
}
else if ((flt_e == 0xff) && (flt_m != 0)) {
@@ -572,7 +572,7 @@ _mesa_float_to_half(float val)
const int new_exp = flt_e - 127;
if (new_exp < -24) {
/* this maps to 0 */
- m = 0;
+ /* m = 0; - already set */
e = 0;
}
else if (new_exp < -14) {
@@ -583,7 +583,7 @@ _mesa_float_to_half(float val)
case 0:
_mesa_warning(NULL,
"float_to_half: logical error in denorm creation!\n");
- m = 0;
+ /* m = 0; - already set */
break;
case 1: m = 512 + (flt_m >> 14); break;
case 2: m = 256 + (flt_m >> 15); break;
@@ -599,7 +599,7 @@ _mesa_float_to_half(float val)
}
else if (new_exp > 15) {
/* map this value to infinity */
- m = 0;
+ /* m = 0; - already set */
e = 31;
}
else {