mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Fix some compiler warnings.
[originally from svn r2134]
This commit is contained in:
parent
670c3f4019
commit
2317fe7e53
6
import.c
6
import.c
@ -1028,9 +1028,9 @@ struct sshcom_key *load_sshcom_key(char *filename)
|
|||||||
* Header lines can end in a trailing backslash for
|
* Header lines can end in a trailing backslash for
|
||||||
* continuation.
|
* continuation.
|
||||||
*/
|
*/
|
||||||
while ((len = strlen(p)) > sizeof(buffer) - (p-buffer) -1 ||
|
while ((len = strlen(p)) > (int)(sizeof(buffer) - (p-buffer) -1) ||
|
||||||
p[len-1] != '\n' || p[len-2] == '\\') {
|
p[len-1] != '\n' || p[len-2] == '\\') {
|
||||||
if (len > (p-buffer) + sizeof(buffer)-2) {
|
if (len > (int)((p-buffer) + sizeof(buffer)-2)) {
|
||||||
errmsg = "Header line too long to deal with";
|
errmsg = "Header line too long to deal with";
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@ -1590,7 +1590,7 @@ int sshcom_write(char *filename, struct ssh2_userkey *key, char *passphrase)
|
|||||||
{
|
{
|
||||||
int slen = 60; /* starts at 60 due to "Comment: " */
|
int slen = 60; /* starts at 60 due to "Comment: " */
|
||||||
char *c = key->comment;
|
char *c = key->comment;
|
||||||
while (strlen(c) > slen) {
|
while ((int)strlen(c) > slen) {
|
||||||
fprintf(fp, "%.*s\\\n", slen, c);
|
fprintf(fp, "%.*s\\\n", slen, c);
|
||||||
c += slen;
|
c += slen;
|
||||||
slen = 70; /* allow 70 chars on subsequent lines */
|
slen = 70; /* allow 70 chars on subsequent lines */
|
||||||
|
Loading…
Reference in New Issue
Block a user