Fix miscellaneous compiler warnings. Thanks to Jacob Nevins
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 24 Oct 2000 10:47:49 +0000 (10:47 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 24 Oct 2000 10:47:49 +0000 (10:47 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@755 cda61777-01e9-0310-a592-d414129be87e

network.h
pageant.c
plink.c
puttygen.c
settings.c
sshpubk.c
terminal.c
window.c
winnet.c
winstore.c

index 71fe333..dda34bc 100644 (file)
--- a/network.h
+++ b/network.h
@@ -14,6 +14,9 @@
  * send _that_ to the receiver function with `urgent' set.
  */
 
+#ifndef PUTTY_NETWORK_H
+#define PUTTY_NETWORK_H
+
 typedef struct Socket_tag *Socket;
 typedef struct SockAddr_tag *SockAddr;
 typedef int (*sk_receiver_t)(Socket s, int urgent, char *data, int len);
@@ -42,3 +45,5 @@ void *sk_get_private_ptr(Socket s);
  */
 char *sk_addr_error(SockAddr addr);
 char *sk_socket_error(Socket addr);
+
+#endif
index 8806f13..53222fa 100644 (file)
--- a/pageant.c
+++ b/pageant.c
@@ -7,6 +7,8 @@
 #include <aclapi.h>
 #endif
 #include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
 #include "ssh.h"
 #include "tree234.h"
 
diff --git a/plink.c b/plink.c
index ace6c75..16a44b3 100644 (file)
--- a/plink.c
+++ b/plink.c
@@ -7,6 +7,7 @@
 #endif
 #include <windows.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <stdarg.h>
 
 #define PUTTY_DO_GLOBALS                      /* actually _define_ globals */
@@ -16,7 +17,7 @@
 
 void fatalbox (char *p, ...) {
     va_list ap;
-    fprintf(stderr, "FATAL ERROR: ", p);
+    fprintf(stderr, "FATAL ERROR: ");
     va_start(ap, p);
     vfprintf(stderr, p, ap);
     va_end(ap);
@@ -26,7 +27,7 @@ void fatalbox (char *p, ...) {
 }
 void connection_fatal (char *p, ...) {
     va_list ap;
-    fprintf(stderr, "FATAL ERROR: ", p);
+    fprintf(stderr, "FATAL ERROR: ");
     va_start(ap, p);
     vfprintf(stderr, p, ap);
     va_end(ap);
index 78e6465..8577c6b 100644 (file)
@@ -6,6 +6,7 @@
 #include <commctrl.h>
 #include <time.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 #define PUTTY_DO_GLOBALS
 
index e762aba..fdea968 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <windows.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include "putty.h"
 #include "storage.h"
 
index fddcf95..c9db8a1 100644 (file)
--- a/sshpubk.c
+++ b/sshpubk.c
@@ -189,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;
 
     /*
index 12ad1e9..f5ffa26 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <ctype.h>
 
 #include "putty.h"
 
index 680f065..3cab819 100644 (file)
--- a/window.c
+++ b/window.c
@@ -1,4 +1,5 @@
 #include <windows.h>
+#include <imm.h>
 #include <commctrl.h>
 #ifndef AUTO_WINSOCK
 #ifdef WINSOCK_TWO
index 6932283..f80d880 100644 (file)
--- a/winnet.c
+++ b/winnet.c
@@ -5,6 +5,7 @@
 #include <windows.h>
 #include <winsock.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 #include "putty.h"
 #include "network.h"
@@ -336,7 +337,7 @@ int select_result(WPARAM wParam, LPARAM lParam) {
     DWORD err;
     char buf[BUFFER_GRANULE];
     Socket s;
-    int atmark;
+    u_long atmark;
 
     /* wParam is the socket itself */
     s = find234(sktree, (void *)wParam, cmpforsearch);
index 5597764..cd5fc34 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <windows.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include "putty.h"
 #include "storage.h"