aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2012-12-08 22:00:44 -0800
committerVinson Lee <vlee@freedesktop.org>2012-12-09 22:06:11 -0800
commit156f6acd7e252460fb218abde0a26f4331706b32 (patch)
treef97677ae251137e2703a75228dc5dfdd4b5263ad
parentd8e67d06b8fd21fd39c1cf9079df001337436fb8 (diff)
getteximage-formats: Ensure texel is initialized.
Fixes uninitialized scalar variable defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r--tests/texturing/getteximage-formats.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/texturing/getteximage-formats.c b/tests/texturing/getteximage-formats.c
index 2901ec9b..0e123388 100644
--- a/tests/texturing/getteximage-formats.c
+++ b/tests/texturing/getteximage-formats.c
@@ -272,6 +272,12 @@ compute_expected_color(const struct format_desc *fmt,
texel[2] = 0.0;
texel[3] = 1.0;
}
+ } else {
+ assert(!"Unexpected texture component sizes");
+ texel[0] = 0.0;
+ texel[1] = 0.0;
+ texel[2] = 0.0;
+ texel[3] = 0.0;
}
(void) baseFormat; /* not used, at this time */