This patch fixes these GCC warnings. primitive-restart.c: In function 'read_index_value': primitive-restart.c:253:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ primitive-restart.c: In function 'test_draw_by_index': primitive-restart.c:445:18: warning: 'restart_index' may be used uninitialized in this function [-Wmaybe-uninitialized] enable_restart(restart_index); ^
Signed-off-by: Vinson Lee <v...@freedesktop.org> --- tests/general/primitive-restart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/general/primitive-restart.c b/tests/general/primitive-restart.c index 5cff163..0674c11 100644 --- a/tests/general/primitive-restart.c +++ b/tests/general/primitive-restart.c @@ -249,6 +249,7 @@ static GLuint read_index_value(const GLvoid *indices, GLenum type, GLuint index) return ((GLuint*)indices)[index]; default: assert(0); + return 0; } } @@ -337,6 +338,7 @@ test_draw_by_index(VBO_CFG vbo_cfg, GLboolean one_by_one, GLenum primMode, GLenu break; default: assert(0); + restart_index = 0; } x = 0.0; -- 1.8.4.2 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit