arb_gpu_shader_fp64: Silence Coverity uninitialized variable defects.

Submitted by Vinson Lee on Nov. 17, 2015, 7:17 a.m.

Details

Message ID 1447744649-11937-1-git-send-email-vlee@freedesktop.org
State New
Headers show
Series "arb_gpu_shader_fp64: Silence Coverity uninitialized variable defects." ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Vinson Lee Nov. 17, 2015, 7:17 a.m.
Coverity does not the parse the shader and cannot determine all cases
are being handled.

Fixes Coverity "uninitialized scalar variable" defects.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
---
 tests/spec/arb_gpu_shader_fp64/execution/getuniformdv.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_gpu_shader_fp64/execution/getuniformdv.c b/tests/spec/arb_gpu_shader_fp64/execution/getuniformdv.c
index 5f7d85e..80ec945 100644
--- a/tests/spec/arb_gpu_shader_fp64/execution/getuniformdv.c
+++ b/tests/spec/arb_gpu_shader_fp64/execution/getuniformdv.c
@@ -152,6 +152,10 @@  piglit_init(int argc, char **argv)
       } else if (name[0] == 'b') {
 	 expectedType = GL_BOOL;
          expectedSize = 1;
+      } else {
+         assert(0);
+         expectedType = GL_NONE;
+         expectedSize = 0;
       }
 
       if (type != expectedType) {