This patch fixes this GCC maybe-uninitialized warning. texwrap.c: In function 'init_int_texture.constprop.3': texwrap.c:1345:8: warning: 'colors' may be used uninitialized in this function [-Wmaybe-uninitialized] int **colors; ^
Signed-off-by: Vinson Lee <v...@freedesktop.org> --- tests/texturing/texwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/texturing/texwrap.c b/tests/texturing/texwrap.c index b353d01..05b9632 100644 --- a/tests/texturing/texwrap.c +++ b/tests/texturing/texwrap.c @@ -1342,7 +1342,7 @@ static void init_int_texture(const struct format_desc *format, unsigned *ui1010102colors[7] = {ui1010102red, ui1010102cyan, ui1010102blue, ui1010102orange, ui1010102white, ui1010102black, (unsigned*)border_real}; - int **colors; + int **colors = { 0 }; int *red, *cyan, *blue, *orange, *white, *black; switch (format->type) { -- 1.8.4.2 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit