[Piglit] [PATCH] ext_transform_feedback-alignment: Fix undefined multiplication.
Vinson Lee
vlee at freedesktop.org
Wed Feb 19 01:25:37 PST 2014
This patch fixes this GCC aggressive-loop-optimizations warning.
alignment.c: In function 'piglit_display':
alignment.c:184:28: warning: iteration 32u invokes undefined behavior [-Waggressive-loop-optimizations]
0x00010203 + 0x04040404 * i;
^
alignment.c:182:2: note: containing loop
for (i = 0; i < EXPECTED_NUM_OUTPUTS; ++i) {
^
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
tests/spec/ext_transform_feedback/alignment.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/spec/ext_transform_feedback/alignment.c b/tests/spec/ext_transform_feedback/alignment.c
index dda8823..5014066 100644
--- a/tests/spec/ext_transform_feedback/alignment.c
+++ b/tests/spec/ext_transform_feedback/alignment.c
@@ -151,7 +151,7 @@ enum piglit_result piglit_display(void)
GLuint *readback;
GLuint buffer[BUFFER_SIZE];
GLuint expected[BUFFER_SIZE];
- int i;
+ unsigned int i;
GLboolean pass = GL_TRUE;
glUseProgram(prog);
--
1.8.5.3
More information about the Piglit
mailing list