[Piglit] [PATCH] texelFetch: Ensure offset_arg is initialized.
Vinson Lee
vlee at freedesktop.org
Mon Dec 10 22:31:36 PST 2012
Fixes uninitialized pointer read defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
tests/texturing/shaders/texelFetch.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/texturing/shaders/texelFetch.c b/tests/texturing/shaders/texelFetch.c
index 2e79828..78a4162 100644
--- a/tests/texturing/shaders/texelFetch.c
+++ b/tests/texturing/shaders/texelFetch.c
@@ -418,6 +418,10 @@ generate_GLSL(enum shader_target test_stage)
case GL_TEXTURE_3D:
offset_arg = fetch_3d_arg;
break;
+ default:
+ assert(!"Unexpected target texture");
+ offset_arg = "";
+ break;
}
} else {
offset_func = "";
--
1.8.0.1
More information about the Piglit
mailing list