mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Workarounds for compiling with -D_FORTIFY_SOURCE=2 (as Ubuntu does), which
doesn't like you to ignore the return value from read()/write()/etc (and apparently can't be shut up with a cast to void). [originally from svn r8614]
This commit is contained in:
@ -161,7 +161,8 @@ int verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
newmode.c_lflag |= ECHO | ISIG | ICANON;
|
||||
tcsetattr(0, TCSANOW, &newmode);
|
||||
line[0] = '\0';
|
||||
read(0, line, sizeof(line) - 1);
|
||||
if (read(0, line, sizeof(line) - 1) <= 0)
|
||||
/* handled below */;
|
||||
tcsetattr(0, TCSANOW, &oldmode);
|
||||
}
|
||||
|
||||
@ -213,7 +214,8 @@ int askalg(void *frontend, const char *algtype, const char *algname,
|
||||
newmode.c_lflag |= ECHO | ISIG | ICANON;
|
||||
tcsetattr(0, TCSANOW, &newmode);
|
||||
line[0] = '\0';
|
||||
read(0, line, sizeof(line) - 1);
|
||||
if (read(0, line, sizeof(line) - 1) <= 0)
|
||||
/* handled below */;
|
||||
tcsetattr(0, TCSANOW, &oldmode);
|
||||
}
|
||||
|
||||
@ -266,7 +268,8 @@ int askappend(void *frontend, Filename filename,
|
||||
newmode.c_lflag |= ECHO | ISIG | ICANON;
|
||||
tcsetattr(0, TCSANOW, &newmode);
|
||||
line[0] = '\0';
|
||||
read(0, line, sizeof(line) - 1);
|
||||
if (read(0, line, sizeof(line) - 1) <= 0)
|
||||
/* handled below */;
|
||||
tcsetattr(0, TCSANOW, &oldmode);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user