[Piglit] [PATCH v2] arb_internalformat_query2: Set expected_value in default case.

Vinson Lee vlee at freedesktop.org
Tue Mar 8 06:37:06 UTC 2016


Fixes uninitialized scalar defect reported by Coverity.

Also fix incorrect assertion.

Suggested-by: Brian Paul <brianp at vmware.com>
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/spec/arb_internalformat_query2/format-components.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/spec/arb_internalformat_query2/format-components.c b/tests/spec/arb_internalformat_query2/format-components.c
index 10d7f52..3b8cf35 100644
--- a/tests/spec/arb_internalformat_query2/format-components.c
+++ b/tests/spec/arb_internalformat_query2/format-components.c
@@ -217,7 +217,8 @@ try(const GLenum *targets, unsigned num_targets,
                                         expected_value = is_depth_format(internalformats[j]);
                                         break;
                                 default:
-                                        assert("incorrect pname for test");
+                                        assert(!"incorrect pname for test");
+                                        expected_value = 0;
                                         break;
                                 }
 
-- 
2.7.2



More information about the Piglit mailing list