Make gcc 2.95.2 happy again, even under ``-Wall -Wshadow -Wpointer-arith -Wcast-align

-Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline''.
This commit is contained in:
Ralf S. Engelschall 2000-02-11 09:47:18 +00:00
parent bb325c7d6a
commit 667ac4ec6a
40 changed files with 80 additions and 11 deletions

View File

@ -80,6 +80,8 @@
#undef PROG #undef PROG
#define PROG asn1parse_main #define PROG asn1parse_main
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int i,badops=0,offset=0,ret=1,j; int i,badops=0,offset=0,ret=1,j;

View File

@ -213,6 +213,8 @@ static char *section=NULL;
static int preserve=0; static int preserve=0;
static int msie_hack=0; static int msie_hack=0;
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
char *key=NULL; char *key=NULL;

View File

@ -77,6 +77,8 @@ static char *ciphers_usage[]={
NULL NULL
}; };
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int ret=1,i; int ret=1,i;

View File

@ -93,6 +93,8 @@ NULL
static X509_CRL *load_crl(char *file, int format); static X509_CRL *load_crl(char *file, int format);
static BIO *bio_out=NULL; static BIO *bio_out=NULL;
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
X509_CRL *x=NULL; X509_CRL *x=NULL;

View File

@ -82,6 +82,8 @@ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile);
* -out arg - output file - default stdout * -out arg - output file - default stdout
*/ */
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int i,badops=0; int i,badops=0;

View File

@ -74,6 +74,9 @@
#define PROG dgst_main #define PROG dgst_main
void do_fp(unsigned char *buf,BIO *f,int sep); void do_fp(unsigned char *buf,BIO *f,int sep);
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
unsigned char *buf=NULL; unsigned char *buf=NULL;

View File

@ -82,6 +82,8 @@
* -C * -C
*/ */
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
DH *dh=NULL; DH *dh=NULL;

View File

@ -86,6 +86,8 @@
static void MS_CALLBACK dh_cb(int p, int n, void *arg); static void MS_CALLBACK dh_cb(int p, int n, void *arg);
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
DH *dh=NULL; DH *dh=NULL;

View File

@ -83,6 +83,8 @@
* -modulus - print the DSA public key * -modulus - print the DSA public key
*/ */
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int ret=1; int ret=1;

View File

@ -85,6 +85,9 @@
*/ */
static void MS_CALLBACK dsa_cb(int p, int n, void *arg); static void MS_CALLBACK dsa_cb(int p, int n, void *arg);
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
DSA *dsa=NULL; DSA *dsa=NULL;

View File

@ -80,6 +80,8 @@ int set_hex(char *in,unsigned char *out,int size);
#define BSIZE (8*1024) #define BSIZE (8*1024)
#define PROG enc_main #define PROG enc_main
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
static const char magic[]="Salted__"; static const char magic[]="Salted__";

View File

@ -68,6 +68,8 @@
#undef PROG #undef PROG
#define PROG errstr_main #define PROG errstr_main
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int i,ret=0; int i,ret=0;

View File

@ -75,6 +75,9 @@
#define PROG gendh_main #define PROG gendh_main
static void MS_CALLBACK dh_cb(int p, int n, void *arg); static void MS_CALLBACK dh_cb(int p, int n, void *arg);
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
DH *dh=NULL; DH *dh=NULL;

View File

@ -73,6 +73,8 @@
#undef PROG #undef PROG
#define PROG gendsa_main #define PROG gendsa_main
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
DSA *dsa=NULL; DSA *dsa=NULL;

View File

@ -75,6 +75,9 @@
#define PROG genrsa_main #define PROG genrsa_main
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg); static void MS_CALLBACK genrsa_cb(int p, int n, void *arg);
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int ret=1; int ret=1;

View File

@ -65,6 +65,7 @@
#undef PROG #undef PROG
#define PROG nseq_main #define PROG nseq_main
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {

View File

@ -86,6 +86,9 @@ int print_attribs(BIO *out, STACK_OF(X509_ATTRIBUTE) *attrlst, char *name);
void hex_prin(BIO *out, unsigned char *buf, int len); void hex_prin(BIO *out, unsigned char *buf, int len);
int alg_print(BIO *x, X509_ALGOR *alg); int alg_print(BIO *x, X509_ALGOR *alg);
int cert_load(BIO *in, STACK_OF(X509) *sk); int cert_load(BIO *in, STACK_OF(X509) *sk);
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
char *infile=NULL, *outfile=NULL, *keyname = NULL; char *infile=NULL, *outfile=NULL, *keyname = NULL;

View File

@ -78,6 +78,8 @@
* -print_certs * -print_certs
*/ */
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
PKCS7 *p7=NULL; PKCS7 *p7=NULL;

View File

@ -66,6 +66,7 @@
#include "apps.h" #include "apps.h"
#define PROG pkcs8_main #define PROG pkcs8_main
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {

View File

@ -136,6 +136,8 @@ static LHASH *req_conf=NULL;
#define TYPE_DSA 2 #define TYPE_DSA 2
#define TYPE_DH 3 #define TYPE_DH 3
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
#ifndef NO_DSA #ifndef NO_DSA

View File

@ -86,6 +86,8 @@
* -pubout - Output a public key. * -pubout - Output a public key.
*/ */
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int ret=1; int ret=1;

View File

@ -153,6 +153,8 @@ static void sc_usage(void)
} }
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int off=0; int off=0;

View File

@ -397,6 +397,8 @@ static int ebcdic_puts(BIO *bp, char *str)
} }
#endif #endif
int MAIN(int, char **);
int MAIN(int argc, char *argv[]) int MAIN(int argc, char *argv[])
{ {
short port=PORT; short port=PORT;

View File

@ -388,6 +388,8 @@ static double tm_Time_F(int s)
* MAIN - main processing area for client * MAIN - main processing area for client
* real name depends on MONOLITH * real name depends on MONOLITH
*/ */
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
double totalTime = 0.0; double totalTime = 0.0;

View File

@ -84,6 +84,9 @@ NULL
}; };
static SSL_SESSION *load_sess_id(char *file, int format); static SSL_SESSION *load_sess_id(char *file, int format);
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
SSL_SESSION *x=NULL; SSL_SESSION *x=NULL;

View File

@ -80,6 +80,8 @@ static int save_certs(char *signerfile, STACK_OF(X509) *signers);
#define SMIME_VERIFY 4 #define SMIME_VERIFY 4
#define SMIME_PK7OUT 5 #define SMIME_PK7OUT 5
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int operation = 0; int operation = 0;

View File

@ -238,6 +238,8 @@ static double Time_F(int s)
#endif #endif
} }
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
unsigned char *buf=NULL,*buf2=NULL; unsigned char *buf=NULL,*buf2=NULL;

View File

@ -75,6 +75,8 @@
* -out arg - output file - default stdout * -out arg - output file - default stdout
*/ */
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int i,badops=0, ret = 1; int i,badops=0, ret = 1;

View File

@ -74,6 +74,8 @@ static int check(X509_STORE *ctx,char *file, STACK_OF(X509)*other, int purpose);
static STACK_OF(X509) *load_untrusted(char *file); static STACK_OF(X509) *load_untrusted(char *file);
static int v_verbose=0; static int v_verbose=0;
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int i,ret=1; int i,ret=1;

View File

@ -66,6 +66,8 @@
#undef PROG #undef PROG
#define PROG version_main #define PROG version_main
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int i,ret=0; int i,ret=0;

View File

@ -141,6 +141,8 @@ static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest,
static int purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt); static int purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt);
static int reqfile=0; static int reqfile=0;
int MAIN(int, char **);
int MAIN(int argc, char **argv) int MAIN(int argc, char **argv)
{ {
int ret=1; int ret=1;

View File

@ -786,6 +786,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
const unsigned char *in, int inlen, int inform, int nid); const unsigned char *in, int inlen, int inform, int nid);
ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid); ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
void ASN1_STRING_TABLE_cleanup(void); void ASN1_STRING_TABLE_cleanup(void);
/* BEGIN ERROR CODES */ /* BEGIN ERROR CODES */

View File

@ -72,7 +72,8 @@ to modify the code.
void BF_encrypt(BF_LONG *data, const BF_KEY *key) void BF_encrypt(BF_LONG *data, const BF_KEY *key)
{ {
#ifndef BF_PTR2 #ifndef BF_PTR2
register BF_LONG l,r,*p,*s; register BF_LONG l,r;
const register BF_LONG *p,*s;
p=key->P; p=key->P;
s= &(key->S[0]); s= &(key->S[0]);
@ -148,7 +149,8 @@ void BF_encrypt(BF_LONG *data, const BF_KEY *key)
void BF_decrypt(BF_LONG *data, const BF_KEY *key) void BF_decrypt(BF_LONG *data, const BF_KEY *key)
{ {
#ifndef BF_PTR2 #ifndef BF_PTR2
register BF_LONG l,r,*p,*s; register BF_LONG l,r;
const register BF_LONG *p,*s;
p=key->P; p=key->P;
s= &(key->S[0]); s= &(key->S[0]);

View File

@ -66,7 +66,7 @@ void BF_set_key(BF_KEY *key, int len, const unsigned char *data)
{ {
int i; int i;
BF_LONG *p,ri,in[2]; BF_LONG *p,ri,in[2];
unsigned char *d,*end; const unsigned char *d,*end;
memcpy((char *)key,(char *)&bf_init,sizeof(BF_KEY)); memcpy((char *)key,(char *)&bf_init,sizeof(BF_KEY));

View File

@ -104,7 +104,7 @@ static unsigned char lst[]="\xC6\x4F\x43\x04\x2A\xEA\xCA\x6E\x58\x36\x80\x5B\xE8
static const char rnd_seed[] = "string to make the random number generator think it has entropy"; static const char rnd_seed[] = "string to make the random number generator think it has entropy";
void message(BIO *out, char *m) static void message(BIO *out, char *m)
{ {
fprintf(stderr, "test %s\n", m); fprintf(stderr, "test %s\n", m);
#if defined(linux) || defined(FreeBSD) /* can we use GNU bc features? */ #if defined(linux) || defined(FreeBSD) /* can we use GNU bc features? */

View File

@ -310,7 +310,7 @@ void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
void *CRYPTO_remalloc(void *addr,int num, const char *file, int line); void *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
void CRYPTO_set_mem_debug_options(long bits); void CRYPTO_set_mem_debug_options(long bits);
long CRYPTO_get_mem_debug_options(); long CRYPTO_get_mem_debug_options(void);
#define CRYPTO_push_info(info) \ #define CRYPTO_push_info(info) \
CRYPTO_push_info_(info, __FILE__, __LINE__); CRYPTO_push_info_(info, __FILE__, __LINE__);
@ -336,7 +336,7 @@ void CRYPTO_dbg_free(void *addr,int before_p);
* 3: 1 + 2 * 3: 1 + 2
*/ */
void CRYPTO_dbg_set_options(long bits); void CRYPTO_dbg_set_options(long bits);
long CRYPTO_dbg_get_options(); long CRYPTO_dbg_get_options(void);
#ifndef NO_FP_API #ifndef NO_FP_API
void CRYPTO_mem_leaks_fp(FILE *); void CRYPTO_mem_leaks_fp(FILE *);

View File

@ -253,7 +253,7 @@ void CRYPTO_set_mem_debug_options(long bits)
set_debug_options_func(bits); set_debug_options_func(bits);
} }
long CRYPTO_get_mem_debug_options() long CRYPTO_get_mem_debug_options(void)
{ {
if (get_debug_options_func != NULL) if (get_debug_options_func != NULL)
return get_debug_options_func(); return get_debug_options_func();

View File

@ -214,7 +214,7 @@ void CRYPTO_dbg_set_options(long bits)
options = bits; options = bits;
} }
long CRYPTO_dbg_get_options() long CRYPTO_dbg_get_options(void)
{ {
return options; return options;
} }

View File

@ -207,7 +207,7 @@ void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a)
Free (a); Free (a);
} }
STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new() STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void)
{ {
return sk_ACCESS_DESCRIPTION_new(NULL); return sk_ACCESS_DESCRIPTION_new(NULL);
} }

View File

@ -462,7 +462,7 @@ void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a);
ACCESS_DESCRIPTION *d2i_ACCESS_DESCRIPTION(ACCESS_DESCRIPTION **a, unsigned char **pp, ACCESS_DESCRIPTION *d2i_ACCESS_DESCRIPTION(ACCESS_DESCRIPTION **a, unsigned char **pp,
long length); long length);
STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(); STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void);
void AUTHORITY_INFO_ACCESS_free(STACK_OF(ACCESS_DESCRIPTION) *a); void AUTHORITY_INFO_ACCESS_free(STACK_OF(ACCESS_DESCRIPTION) *a);
STACK_OF(ACCESS_DESCRIPTION) *d2i_AUTHORITY_INFO_ACCESS(STACK_OF(ACCESS_DESCRIPTION) **a, STACK_OF(ACCESS_DESCRIPTION) *d2i_AUTHORITY_INFO_ACCESS(STACK_OF(ACCESS_DESCRIPTION) **a,
unsigned char **pp, long length); unsigned char **pp, long length);