From 49bad83179144047e7d9e070d63d869dba691736 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 24 Oct 2000 10:47:49 +0000 Subject: [PATCH] Fix miscellaneous compiler warnings. Thanks to Jacob Nevins git-svn-id: svn://svn.tartarus.org/sgt/putty@755 cda61777-01e9-0310-a592-d414129be87e --- network.h | 5 +++++ pageant.c | 2 ++ plink.c | 5 +++-- puttygen.c | 1 + settings.c | 1 + sshpubk.c | 2 +- terminal.c | 1 + window.c | 1 + winnet.c | 3 ++- winstore.c | 1 + 10 files changed, 18 insertions(+), 4 deletions(-) diff --git a/network.h b/network.h index 71fe333b..dda34bc0 100644 --- 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 diff --git a/pageant.c b/pageant.c index 8806f13b..53222fab 100644 --- a/pageant.c +++ b/pageant.c @@ -7,6 +7,8 @@ #include #endif #include +#include +#include #include "ssh.h" #include "tree234.h" diff --git a/plink.c b/plink.c index ace6c75c..16a44b38 100644 --- a/plink.c +++ b/plink.c @@ -7,6 +7,7 @@ #endif #include #include +#include #include #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); diff --git a/puttygen.c b/puttygen.c index 78e6465e..8577c6b5 100644 --- a/puttygen.c +++ b/puttygen.c @@ -6,6 +6,7 @@ #include #include #include +#include #define PUTTY_DO_GLOBALS diff --git a/settings.c b/settings.c index e762abaf..fdea968c 100644 --- a/settings.c +++ b/settings.c @@ -4,6 +4,7 @@ #include #include +#include #include "putty.h" #include "storage.h" diff --git a/sshpubk.c b/sshpubk.c index fddcf95e..c9db8a1b 100644 --- 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; /* diff --git a/terminal.c b/terminal.c index 12ad1e9c..f5ffa262 100644 --- a/terminal.c +++ b/terminal.c @@ -2,6 +2,7 @@ #include #include +#include #include "putty.h" diff --git a/window.c b/window.c index 680f065a..3cab8197 100644 --- a/window.c +++ b/window.c @@ -1,4 +1,5 @@ #include +#include #include #ifndef AUTO_WINSOCK #ifdef WINSOCK_TWO diff --git a/winnet.c b/winnet.c index 69322836..f80d8806 100644 --- a/winnet.c +++ b/winnet.c @@ -5,6 +5,7 @@ #include #include #include +#include #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); diff --git a/winstore.c b/winstore.c index 55977648..cd5fc343 100644 --- a/winstore.c +++ b/winstore.c @@ -5,6 +5,7 @@ #include #include +#include #include "putty.h" #include "storage.h" -- 2.11.0