1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

Fix miscellaneous compiler warnings. Thanks to Jacob Nevins

[originally from svn r755]
This commit is contained in:
Simon Tatham 2000-10-24 10:47:49 +00:00
parent 5ff9cc2f1f
commit 384eeb3f76
10 changed files with 18 additions and 4 deletions

View File

@ -14,6 +14,9 @@
* send _that_ to the receiver function with `urgent' set. * send _that_ to the receiver function with `urgent' set.
*/ */
#ifndef PUTTY_NETWORK_H
#define PUTTY_NETWORK_H
typedef struct Socket_tag *Socket; typedef struct Socket_tag *Socket;
typedef struct SockAddr_tag *SockAddr; typedef struct SockAddr_tag *SockAddr;
typedef int (*sk_receiver_t)(Socket s, int urgent, char *data, int len); 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_addr_error(SockAddr addr);
char *sk_socket_error(Socket addr); char *sk_socket_error(Socket addr);
#endif

View File

@ -7,6 +7,8 @@
#include <aclapi.h> #include <aclapi.h>
#endif #endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "ssh.h" #include "ssh.h"
#include "tree234.h" #include "tree234.h"

View File

@ -7,6 +7,7 @@
#endif #endif
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#define PUTTY_DO_GLOBALS /* actually _define_ globals */ #define PUTTY_DO_GLOBALS /* actually _define_ globals */
@ -16,7 +17,7 @@
void fatalbox (char *p, ...) { void fatalbox (char *p, ...) {
va_list ap; va_list ap;
fprintf(stderr, "FATAL ERROR: ", p); fprintf(stderr, "FATAL ERROR: ");
va_start(ap, p); va_start(ap, p);
vfprintf(stderr, p, ap); vfprintf(stderr, p, ap);
va_end(ap); va_end(ap);
@ -26,7 +27,7 @@ void fatalbox (char *p, ...) {
} }
void connection_fatal (char *p, ...) { void connection_fatal (char *p, ...) {
va_list ap; va_list ap;
fprintf(stderr, "FATAL ERROR: ", p); fprintf(stderr, "FATAL ERROR: ");
va_start(ap, p); va_start(ap, p);
vfprintf(stderr, p, ap); vfprintf(stderr, p, ap);
va_end(ap); va_end(ap);

View File

@ -6,6 +6,7 @@
#include <commctrl.h> #include <commctrl.h>
#include <time.h> #include <time.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#define PUTTY_DO_GLOBALS #define PUTTY_DO_GLOBALS

View File

@ -4,6 +4,7 @@
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include "putty.h" #include "putty.h"
#include "storage.h" #include "storage.h"

View File

@ -189,7 +189,7 @@ int saversakey(char *filename, struct RSAKey *key, struct RSAAux *aux,
unsigned char buf[16384]; unsigned char buf[16384];
unsigned char keybuf[16]; unsigned char keybuf[16];
struct MD5Context md5c; struct MD5Context md5c;
char *p, *estart; unsigned char *p, *estart;
FILE *fp; FILE *fp;
/* /*

View File

@ -2,6 +2,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h>
#include "putty.h" #include "putty.h"

View File

@ -1,4 +1,5 @@
#include <windows.h> #include <windows.h>
#include <imm.h>
#include <commctrl.h> #include <commctrl.h>
#ifndef AUTO_WINSOCK #ifndef AUTO_WINSOCK
#ifdef WINSOCK_TWO #ifdef WINSOCK_TWO

View File

@ -5,6 +5,7 @@
#include <windows.h> #include <windows.h>
#include <winsock.h> #include <winsock.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include "putty.h" #include "putty.h"
#include "network.h" #include "network.h"
@ -336,7 +337,7 @@ int select_result(WPARAM wParam, LPARAM lParam) {
DWORD err; DWORD err;
char buf[BUFFER_GRANULE]; char buf[BUFFER_GRANULE];
Socket s; Socket s;
int atmark; u_long atmark;
/* wParam is the socket itself */ /* wParam is the socket itself */
s = find234(sktree, (void *)wParam, cmpforsearch); s = find234(sktree, (void *)wParam, cmpforsearch);

View File

@ -5,6 +5,7 @@
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include "putty.h" #include "putty.h"
#include "storage.h" #include "storage.h"