Fix miscellaneous compiler warnings. Thanks to Jacob Nevins
[u/mdw/putty] / sshpubk.c
index fd40db7..c9db8a1 100644 (file)
--- a/sshpubk.c
+++ b/sshpubk.c
@@ -177,6 +177,7 @@ int rsakey_encrypted(char *filename, char **comment) {
         !strcmp(buf, rsa_signature)) {
         return loadrsakey_main(fp, NULL, NULL, comment, NULL);
     }
+    fclose(fp);
     return 0;                          /* wasn't the right kind of file */
 }
 
@@ -188,7 +189,7 @@ int saversakey(char *filename, struct RSAKey *key, struct RSAAux *aux,
     unsigned char buf[16384];
     unsigned char keybuf[16];
     struct MD5Context md5c;
-    char *p, *estart;
+    unsigned char *p, *estart;
     FILE *fp;
 
     /*