[Piglit] [PATCH] fbo-depthstencil: Fix uninitialized variable warning.

Vinson Lee vlee at freedesktop.org
Tue Dec 24 15:02:55 PST 2013


Fix GCC maybe-uninitialized warning.

fbo-depthstencil.c: In function 'piglit_display':
fbo-depthstencil.c:483:2: warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return res;
  ^

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/fbo/fbo-depthstencil.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/fbo/fbo-depthstencil.c b/tests/fbo/fbo-depthstencil.c
index ae91186..d67cee7 100644
--- a/tests/fbo/fbo-depthstencil.c
+++ b/tests/fbo/fbo-depthstencil.c
@@ -468,6 +468,7 @@ enum piglit_result piglit_display(void)
 		break;
 	default:
 		assert(0);
+		res = PIGLIT_SKIP;
 	}
 
 	/* Cleanup. */
-- 
1.8.5.2



More information about the Piglit mailing list