[sh] Fix a "may be unused" warning on mips-gcc
mips-gcc for mips32 was complaining that c was potentially used before being set. Setting it to 0 before calling fdgetsc() looks like the right thing to do in this instance; there's an explicit check for c == 0 later on. Tested: mips-gcc mips32 build, running /bin/sh on mips32
This commit is contained in:
parent
6c88ef1c81
commit
4d0b267a1f
@ -245,6 +245,7 @@ readcmd(int argc __unused, char **argv __unused)
|
||||
lastnonifs = lastnonifsws = -1;
|
||||
fdctx_init(STDIN_FILENO, &fdctx);
|
||||
for (;;) {
|
||||
c = 0;
|
||||
nread = fdgetc(&fdctx, &c);
|
||||
if (nread == -1) {
|
||||
if (errno == EINTR) {
|
||||
|
Loading…
Reference in New Issue
Block a user