summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>1999-10-21 12:26:21 +0000
committerBrian Paul <[email protected]>1999-10-21 12:26:21 +0000
commit88737eeedc26bf4af0d13e2d869628514b95a435 (patch)
treeb99b1010d40efa2fe755267d4b37e3898f2ecdf7 /src
parentb19ba7827cded079470fc0c848124089ecb6ca5f (diff)
silenced uninitialized variable warnings
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/blend.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 7e1037089f1..a8365a5e328 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -1,4 +1,4 @@
-/* $Id: blend.c,v 1.4 1999/10/08 09:27:10 keithw Exp $ */
+/* $Id: blend.c,v 1.5 1999/10/21 12:26:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -551,6 +551,7 @@ static void blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[],
break;
default:
/* this should never happen */
+ sA = 0.0F;
gl_problem(ctx, "Bad blend source A factor in do_blend");
}
@@ -602,6 +603,7 @@ static void blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[],
break;
default:
/* this should never happen */
+ dR = dG = dB = 0.0F;
gl_problem(ctx, "Bad blend dest RGB factor in do_blend");
}
@@ -645,6 +647,7 @@ static void blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[],
break;
default:
/* this should never happen */
+ dA = 0.0F;
gl_problem(ctx, "Bad blend dest A factor in do_blend");
return;
}
@@ -688,6 +691,11 @@ static void blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[],
b = Bd * dB - Bs * sB;
a = Ad * dA - As * sA;
}
+ else {
+ /* should never get here */
+ r = g = b = a = 0.0F; /* silence uninitialized var warning */
+ gl_problem(ctx, "unexpected BlendEquation in blend_general()");
+ }
/* final clamping */
rgba[i][RCOMP] = (GLint) CLAMP( r, 0.0F, 255.0F );