[Piglit] [PATCH] generatemipmap-base-change: Initialize change_size to false.

Vinson Lee vlee at freedesktop.org
Sat Apr 2 06:24:10 UTC 2016


Otherwise change_size is always true and the size argument has no effect.

Fixes "logically dead code" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/texturing/generatemipmap-base-change.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/texturing/generatemipmap-base-change.c b/tests/texturing/generatemipmap-base-change.c
index 3ea5698..e3b24cb 100644
--- a/tests/texturing/generatemipmap-base-change.c
+++ b/tests/texturing/generatemipmap-base-change.c
@@ -44,7 +44,7 @@ piglit_init(int argc, char **argv)
 {
 #define MAX_SIZE 8
 	GLubyte img[MAX_SIZE * MAX_SIZE * 4];
-	bool change_size = true, change_format = false;
+	bool change_size = false, change_format = false;
 	int i;
 	GLuint tex;
 	GLsizei base_size, w0 = 0, h0 = 0;
-- 
2.7.4



More information about the Piglit mailing list