mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 10:19:04 +00:00
[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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360028
|
@ -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 a new issue