msvcrt/tests: Remove dead assignment (Clang) (try 2)
Frédéric Delanoy
frederic.delanoy at gmail.com
Thu Jul 7 14:11:57 CDT 2011
---
dlls/msvcrt/tests/file.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c
index 0231f72..93f5e86 100644
--- a/dlls/msvcrt/tests/file.c
+++ b/dlls/msvcrt/tests/file.c
@@ -130,9 +130,9 @@ static void test_fileops( void )
ok(buffer[0] == outbuffer[strlen(outbuffer)-1],"fgets exchanged chars for bufmode=%x\n", bufmodes[bufmode]);
rewind(file);
- for (i = 0, c = EOF; i < sizeof(outbuffer); i++)
+ for (i = 0; i < sizeof(outbuffer); i++)
{
- ok((c = fgetc(file)) == outbuffer[i], "fgetc returned wrong data for bufmode=%x\n", bufmodes[bufmode]);
+ ok(fgetc(file) == outbuffer[i], "fgetc returned wrong data for bufmode=%x\n", bufmodes[bufmode]);
}
ok((c = fgetc(file)) == EOF, "getc did not return EOF for bufmode=%x\n", bufmodes[bufmode]);
ok(feof(file), "feof did not return EOF for bufmode=%x\n", bufmodes[bufmode]);
@@ -146,7 +146,7 @@ static void test_fileops( void )
ok(c == outbuffer[sizeof(outbuffer) - 1],
"getc did not return ungetc'd data for bufmode=%x\n", bufmodes[bufmode]);
ok(!feof(file), "feof after getc returned EOF prematurely for bufmode=%x\n", bufmodes[bufmode]);
- ok((c = fgetc(file)) == EOF, "getc did not return EOF for bufmode=%x\n", bufmodes[bufmode]);
+ ok(fgetc(file) == EOF, "getc did not return EOF for bufmode=%x\n", bufmodes[bufmode]);
ok(feof(file), "feof after getc did not return EOF for bufmode=%x\n", bufmodes[bufmode]);
rewind(file);
@@ -322,7 +322,7 @@ static void test_asciimode(void)
{
FILE *fp;
char buf[64];
- int c, i, j;
+ int i, j;
/* Simple test of CR CR LF handling. Test both fgets and fread code paths, they're different! */
fp = fopen("ascii.tst", "wb");
@@ -357,35 +357,35 @@ static void test_asciimode(void)
fclose(fp);
fp = fopen("ascii.tst", "r");
- c= fgetc(fp);
- c= fgetc(fp);
+ fgetc(fp);
+ fgetc(fp);
fseek(fp,0,SEEK_CUR);
for(i=1; i<10; i++) {
ok((j = ftell(fp)) == i*3, "ftell fails in TEXT mode\n");
fseek(fp,0,SEEK_CUR);
- ok((c = fgetc(fp)) == '0'+ i, "fgetc after fseek failed in line %d\n", i);
- c= fgetc(fp);
+ ok(fgetc(fp) == '0'+ i, "fgetc after fseek failed in line %d\n", i);
+ fgetc(fp);
}
/* Show that fseek doesn't skip \\r !*/
rewind(fp);
- c= fgetc(fp);
+ fgetc(fp);
fseek(fp, 2 ,SEEK_CUR);
for(i=1; i<10; i++) {
- ok((c = fgetc(fp)) == '0'+ i, "fgetc after fseek with pos Offset failed in line %d\n", i);
+ ok(fgetc(fp) == '0'+ i, "fgetc after fseek with pos Offset failed in line %d\n", i);
fseek(fp, 2 ,SEEK_CUR);
}
fseek(fp, 9*3 ,SEEK_SET);
- c = fgetc(fp);
+ fgetc(fp);
fseek(fp, -4 ,SEEK_CUR);
for(i= 8; i>=0; i--) {
- ok((c = fgetc(fp)) == '0'+ i, "fgetc after fseek with neg Offset failed in line %d\n", i);
+ ok(fgetc(fp) == '0'+ i, "fgetc after fseek with neg Offset failed in line %d\n", i);
fseek(fp, -4 ,SEEK_CUR);
}
/* Show what happens if fseek positions filepointer on \\r */
fclose(fp);
fp = fopen("ascii.tst", "r");
fseek(fp, 3 ,SEEK_SET);
- ok((c = fgetc(fp)) == '1', "fgetc fails to read next char when positioned on \\r\n");
+ ok(fgetc(fp) == '1', "fgetc fails to read next char when positioned on \\r\n");
fclose(fp);
unlink("ascii.tst");
--
1.7.6
More information about the wine-patches
mailing list