test/testiconv.c
changeset 1516 4d241ea8a1cd
parent 1502 d403a39389da
child 1528 ff3322d66771
     1.1 --- a/test/testiconv.c	Mon Mar 13 04:35:59 2006 +0000
     1.2 +++ b/test/testiconv.c	Mon Mar 13 05:36:42 2006 +0000
     1.3 @@ -44,7 +44,7 @@
     1.4  	char buffer[BUFSIZ];
     1.5  	char *ucs4;
     1.6  	char *test[2];
     1.7 -	int i, j, index = 0;
     1.8 +	int i, index = 0;
     1.9  	FILE *file;
    1.10  	int errors = 0;
    1.11  
    1.12 @@ -59,8 +59,9 @@
    1.13  
    1.14  	while ( fgets(buffer, sizeof(buffer), file) ) {
    1.15  		/* Convert to UCS-4 */
    1.16 +		size_t len;
    1.17  		ucs4 = SDL_iconv_string("UCS-4", "UTF-8", buffer, SDL_strlen(buffer)+1);
    1.18 -		size_t len = (widelen(ucs4)+1)*4;
    1.19 +		len = (widelen(ucs4)+1)*4;
    1.20  		for ( i = 0; i < SDL_arraysize(formats); ++i ) {
    1.21  			if ( (SDL_strncasecmp(formats[i], "UTF16", 5) == 0 ||
    1.22  			      SDL_strncasecmp(formats[i], "UTF-16", 6) == 0 ||