[Piglit] [PATCH] asmparsertest: Cast isspace input to int to silence compiler warning.

Vinson Lee vlee at freedesktop.org
Sun Feb 19 22:44:59 PST 2012


Fixes this GCC warning on Cygwin.
asmparsertest.c: In function ‘compile’:
asmparsertest.c:136:4: warning: array subscript has type ‘char’

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/asmparsertest/asmparsertest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/asmparsertest/asmparsertest.c b/tests/asmparsertest/asmparsertest.c
index 085ec1b..357be3b 100644
--- a/tests/asmparsertest/asmparsertest.c
+++ b/tests/asmparsertest/asmparsertest.c
@@ -133,7 +133,7 @@ compile(const char *filename, GLenum target, int use_ARB)
 
 			ptr += strlen("# REQUIRE ");
 
-			for (i = 0; !isspace(ptr[i]) && (ptr[i] != '\0'); i++) {
+			for (i = 0; !isspace((int) ptr[i]) && (ptr[i] != '\0'); i++) {
 				extension[i] = ptr[i];
 			}
 
-- 
1.7.9



More information about the Piglit mailing list