Fix some compiler warnings.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 25 Oct 2002 13:00:45 +0000 (13:00 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 25 Oct 2002 13:00:45 +0000 (13:00 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@2134 cda61777-01e9-0310-a592-d414129be87e

import.c

index 3066298..ff43816 100644 (file)
--- a/import.c
+++ b/import.c
@@ -1028,9 +1028,9 @@ struct sshcom_key *load_sshcom_key(char *filename)
              * Header lines can end in a trailing backslash for
              * 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] == '\\') {
-                if (len > (p-buffer) + sizeof(buffer)-2) {
+                if (len > (int)((p-buffer) + sizeof(buffer)-2)) {
                     errmsg = "Header line too long to deal with";
                     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: " */
        char *c = key->comment;
-       while (strlen(c) > slen) {
+       while ((int)strlen(c) > slen) {
            fprintf(fp, "%.*s\\\n", slen, c);
            c += slen;
            slen = 70;                 /* allow 70 chars on subsequent lines */