RT3543: Remove #ifdef LINT

I also replaced some exit/return wrappers in various
programs (from main) to standardize on return.

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Rich Salz 2014-09-23 13:23:09 -04:00
parent a4a934119d
commit 5cf37957fb
12 changed files with 2 additions and 47 deletions

View File

@ -560,9 +560,6 @@ static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
if (p == 3) c='\n'; if (p == 3) c='\n';
BIO_write(BN_GENCB_get_arg(cb),&c,1); BIO_write(BN_GENCB_get_arg(cb),&c,1);
(void)BIO_flush(BN_GENCB_get_arg(cb)); (void)BIO_flush(BN_GENCB_get_arg(cb));
#ifdef LINT
p=n;
#endif
return 1; return 1;
} }

View File

@ -482,9 +482,6 @@ static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb)
if (p == 3) c='\n'; if (p == 3) c='\n';
BIO_write(BN_GENCB_get_arg(cb),&c,1); BIO_write(BN_GENCB_get_arg(cb),&c,1);
(void)BIO_flush(BN_GENCB_get_arg(cb)); (void)BIO_flush(BN_GENCB_get_arg(cb));
#ifdef LINT
p=n;
#endif
#ifdef GENCB_TEST #ifdef GENCB_TEST
if(stop_keygen_flag) if(stop_keygen_flag)
return 0; return 0;

View File

@ -233,9 +233,6 @@ static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
if (p == 3) c='\n'; if (p == 3) c='\n';
BIO_write(BN_GENCB_get_arg(cb),&c,1); BIO_write(BN_GENCB_get_arg(cb),&c,1);
(void)BIO_flush(BN_GENCB_get_arg(cb)); (void)BIO_flush(BN_GENCB_get_arg(cb));
#ifdef LINT
p=n;
#endif
return 1; return 1;
} }
#else /* !OPENSSL_NO_DH */ #else /* !OPENSSL_NO_DH */

View File

@ -433,8 +433,5 @@ static int genpkey_cb(EVP_PKEY_CTX *ctx)
if (p == 3) c='\n'; if (p == 3) c='\n';
BIO_write(b,&c,1); BIO_write(b,&c,1);
(void)BIO_flush(b); (void)BIO_flush(b);
#ifdef LINT
p=n;
#endif
return 1; return 1;
} }

View File

@ -327,9 +327,6 @@ static int MS_CALLBACK genrsa_cb(int p, int n, BN_GENCB *cb)
if (p == 3) c='\n'; if (p == 3) c='\n';
BIO_write(BN_GENCB_get_arg(cb),&c,1); BIO_write(BN_GENCB_get_arg(cb),&c,1);
(void)BIO_flush(BN_GENCB_get_arg(cb)); (void)BIO_flush(BN_GENCB_get_arg(cb));
#ifdef LINT
p=n;
#endif
return 1; return 1;
} }
#else /* !OPENSSL_NO_RSA */ #else /* !OPENSSL_NO_RSA */

View File

@ -1773,9 +1773,6 @@ static int genpkey_cb(EVP_PKEY_CTX *ctx)
if (p == 3) c='\n'; if (p == 3) c='\n';
BIO_write(b,&c,1); BIO_write(b,&c,1);
(void)BIO_flush(b); (void)BIO_flush(b);
#ifdef LINT
p=n;
#endif
return 1; return 1;
} }

View File

@ -272,9 +272,6 @@ static SIGRETTYPE sig_done(int sig)
{ {
signal(SIGALRM,sig_done); signal(SIGALRM,sig_done);
run=0; run=0;
#ifdef LINT
sig=sig;
#endif
} }
#endif #endif
@ -2648,9 +2645,6 @@ static void print_message(const char *s, long num, int length)
BIO_printf(bio_err,mr ? "+DN:%s:%ld:%d\n" BIO_printf(bio_err,mr ? "+DN:%s:%ld:%d\n"
: "Doing %s %ld times on %d size blocks: ",s,num,length); : "Doing %s %ld times on %d size blocks: ",s,num,length);
(void)BIO_flush(bio_err); (void)BIO_flush(bio_err);
#endif
#ifdef LINT
num=num;
#endif #endif
} }
@ -2666,9 +2660,6 @@ static void pkey_print_message(const char *str, const char *str2, long num,
BIO_printf(bio_err,mr ? "+DNP:%ld:%d:%s:%s\n" BIO_printf(bio_err,mr ? "+DNP:%ld:%d:%s:%s\n"
: "Doing %ld %d bit %s %s's: ",num,bits,str,str2); : "Doing %ld %d bit %s %s's: ",num,bits,str,str2);
(void)BIO_flush(bio_err); (void)BIO_flush(bio_err);
#endif
#ifdef LINT
num=num;
#endif #endif
} }

View File

@ -133,9 +133,6 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offse
{ {
op=p; op=p;
j=ASN1_get_object(&p,&len,&tag,&xclass,length); j=ASN1_get_object(&p,&len,&tag,&xclass,length);
#ifdef LINT
j=j;
#endif
if (j & 0x80) if (j & 0x80)
{ {
if (BIO_write(bp,"Error in encoding\n",18) <= 0) if (BIO_write(bp,"Error in encoding\n",18) <= 0)

View File

@ -462,9 +462,6 @@ static void popsig(void)
static void recsig(int i) static void recsig(int i)
{ {
longjmp(save,1); longjmp(save,1);
#ifdef LINT
i=i;
#endif
} }
#ifdef OPENSSL_SYS_MSDOS #ifdef OPENSSL_SYS_MSDOS

View File

@ -86,14 +86,8 @@ int main(int argc, char *argv[])
for (i=0; i<8; i++) for (i=0; i<8; i++)
printf("%02x ",k1[i]); printf("%02x ",k1[i]);
printf("\n"); printf("\n");
exit(1); return(1);
} }
else printf("error %d\n",i);
{
printf("error %d\n",i);
exit(0);
}
#ifdef LINT
return(0); return(0);
#endif
} }

View File

@ -226,9 +226,6 @@ static int MS_CALLBACK cb(int p, int n, BN_GENCB *arg)
if (p == 3) c='\n'; if (p == 3) c='\n';
BIO_write(BN_GENCB_get_arg(arg),&c,1); BIO_write(BN_GENCB_get_arg(arg),&c,1);
(void)BIO_flush(BN_GENCB_get_arg(arg)); (void)BIO_flush(BN_GENCB_get_arg(arg));
#ifdef LINT
p=n;
#endif
return 1; return 1;
} }

View File

@ -537,9 +537,6 @@ static void MS_CALLBACK cb(int p, int n, void *arg)
if (p == 3) c='\n'; if (p == 3) c='\n';
BIO_write((BIO *)arg,&c,1); BIO_write((BIO *)arg,&c,1);
(void)BIO_flush((BIO *)arg); (void)BIO_flush((BIO *)arg);
#ifdef LINT
p=n;
#endif
} }
#endif #endif
#endif #endif