From 4e321ffafff3a1f31bbbfdcf1b17c0ecbde2121f Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 26 Apr 2005 17:43:53 +0000 Subject: Fixes for signed/unsigned warnings and shadows. --- apps/s_apps.h | 2 +- apps/s_client.c | 2 +- apps/s_server.c | 4 ++-- apps/s_socket.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/s_apps.h b/apps/s_apps.h index bb48244ead..886a95a2b8 100644 --- a/apps/s_apps.h +++ b/apps/s_apps.h @@ -148,7 +148,7 @@ typedef fd_mask fd_set; #define PORT_STR "4433" #define PROTOCOL "tcp" -int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), char *context); +int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context); #ifdef HEADER_X509_H int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); #endif diff --git a/apps/s_client.c b/apps/s_client.c index 2f0f568daf..d468778cd1 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -275,7 +275,7 @@ int MAIN(int argc, char **argv) #endif struct sockaddr peer; - int peerlen = sizeof(peer); + socklen_t peerlen = sizeof(peer); int enable_timeouts = 0 ; long mtu = 0; diff --git a/apps/s_server.c b/apps/s_server.c index 059c4a06c7..a5e8bcd024 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -525,7 +525,7 @@ int MAIN(int argc, char *argv[]) int vflags = 0; short port=PORT; char *CApath=NULL,*CAfile=NULL; - char *context = NULL; + unsigned char *context = NULL; char *dhfile = NULL; char *named_curve = NULL; int badop=0,bugs=0; @@ -604,7 +604,7 @@ int MAIN(int argc, char *argv[]) else if (strcmp(*argv,"-context") == 0) { if (--argc < 1) goto bad; - context= *(++argv); + context= (unsigned char *)*(++argv); } else if (strcmp(*argv,"-cert") == 0) { diff --git a/apps/s_socket.c b/apps/s_socket.c index b5dd47d76b..c022585978 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -277,7 +277,7 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port, int type) return(1); } -int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), char *context) +int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), unsigned char *context) { int sock; char *name = NULL; -- cgit v1.2.3