[Piglit] [PATCH] texwrap: Silence uninitialized variable warning.
Vinson Lee
vlee at freedesktop.org
Fri Jan 17 17:12:30 PST 2014
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 <vlee at 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
More information about the Piglit
mailing list