Re: msvcrt/tests: Remove dead assignment (Clang)
2011/7/7 Frédéric Delanoy <frederic.delanoy(a)gmail.com>:
c = outbuffer[sizeof(outbuffer) - 1]; ok(ungetc(c, file) == c, "ungetc did not return its input for bufmode=%x\n", bufmodes[bufmode]); ok(!feof(file), "feof after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]); - ok((c = fgetc(file)) != EOF, "getc after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]); + ok(fgetc(file) != EOF, "getc after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]); ok(c == outbuffer[sizeof(outbuffer) - 1], "getc did not return ungetc'd data for bufmode=%x\n", bufmodes[bufmode]);
Also, this change doesn't look like it's removing a dead assignment, but it does make the test ok(c == outbuffer[sizeof(outbuffer) - 1], ...) always succeed. Octavian
On Thu, Jul 7, 2011 at 19:07, Octavian Voicu <octavian.voicu(a)gmail.com> wrote:
2011/7/7 Frédéric Delanoy <frederic.delanoy(a)gmail.com>:
c = outbuffer[sizeof(outbuffer) - 1]; ok(ungetc(c, file) == c, "ungetc did not return its input for bufmode=%x\n", bufmodes[bufmode]); ok(!feof(file), "feof after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]); - ok((c = fgetc(file)) != EOF, "getc after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]); + ok(fgetc(file) != EOF, "getc after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]); ok(c == outbuffer[sizeof(outbuffer) - 1], "getc did not return ungetc'd data for bufmode=%x\n", bufmodes[bufmode]);
Also, this change doesn't look like it's removing a dead assignment, but it does make the test ok(c == outbuffer[sizeof(outbuffer) - 1], ...) always succeed.
Oops right. Thanks for spotting. I'll fix that.
participants (2)
-
Frédéric Delanoy -
Octavian Voicu