diff options
author | Bodo Möller <bodo@openssl.org> | 1999-06-10 16:29:32 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 1999-06-10 16:29:32 +0000 |
commit | d58d092bc9f0a541ce5f0b265ee819f7ab086560 (patch) | |
tree | 497575b6ed095b6672e9f17ffb3f20223d3b6b36 /crypto | |
parent | 9d9b559ef03e481d2feec5a3a9a28f4a41f8189a (diff) |
Avoid warnings.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/a_object.c | 4 | ||||
-rw-r--r-- | crypto/bf/bftest.c | 2 | ||||
-rw-r--r-- | crypto/bio/bss_bio.c | 1 | ||||
-rw-r--r-- | crypto/bio/bss_conn.c | 2 | ||||
-rw-r--r-- | crypto/mem.c | 4 | ||||
-rw-r--r-- | crypto/rand/randtest.c | 18 |
6 files changed, 16 insertions, 15 deletions
diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c index 578df13f29..5f721026b8 100644 --- a/crypto/asn1/a_object.c +++ b/crypto/asn1/a_object.c @@ -206,7 +206,7 @@ int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a) if (i > 2) i=2; l-=(long)(i*40); - sprintf(tbuf,"%d.%ld",i,l); + sprintf(tbuf,"%d.%lu",i,l); i=strlen(tbuf); strncpy(buf,tbuf,buf_len); buf_len-=i; @@ -219,7 +219,7 @@ int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a) l|=p[idx]&0x7f; if (!(p[idx] & 0x80)) { - sprintf(tbuf,".%ld",l); + sprintf(tbuf,".%lu",l); i=strlen(tbuf); if (buf_len > 0) strncpy(buf,tbuf,buf_len); diff --git a/crypto/bf/bftest.c b/crypto/bf/bftest.c index 5ff14b1512..6ecd2609a9 100644 --- a/crypto/bf/bftest.c +++ b/crypto/bf/bftest.c @@ -308,7 +308,7 @@ static int print_test_data(void) printf("c="); for (j=0; j<8; j++) printf("%02X",key_out[i][j]); - printf(" k[%2d]=",i+1); + printf(" k[%2u]=",i+1); for (j=0; j<i+1; j++) printf("%02X",key_test[j]); printf("\n"); diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c index cae5917036..f026d51807 100644 --- a/crypto/bio/bss_bio.c +++ b/crypto/bio/bss_bio.c @@ -9,6 +9,7 @@ #include <assert.h> #include <stdlib.h> +#include <string.h> #include <openssl/bio.h> #include <openssl/err.h> diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index 7080cfdd59..68c46e3d69 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -570,7 +570,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, char *ptr) if (data->param_hostname) BIO_set_conn_hostname(dbio,data->param_hostname); BIO_set_nbio(dbio,data->nbio); - BIO_set_info_callback(dbio,data->info_callback); + (void)BIO_set_info_callback(dbio,data->info_callback); break; case BIO_CTRL_SET_CALLBACK: data->info_callback=(int (*)())ptr; diff --git a/crypto/mem.c b/crypto/mem.c index 75ab2a1b36..01f189bfc9 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -308,8 +308,8 @@ static void print_leak(MEM *m, MEM_LEAK *l) if(m->addr == (char *)l->bio) return; - sprintf(buf,"%5ld file=%s, line=%d, number=%d, address=%08lX\n", - m->order,m->file,m->line,m->num,(long)m->addr); + sprintf(buf,"%5lu file=%s, line=%d, number=%d, address=%08lX\n", + m->order,m->file,m->line,m->num,(unsigned long)m->addr); BIO_puts(l->bio,buf); l->chunks++; l->bytes+=m->num; diff --git a/crypto/rand/randtest.c b/crypto/rand/randtest.c index 5722bf746e..f0706d779a 100644 --- a/crypto/rand/randtest.c +++ b/crypto/rand/randtest.c @@ -117,7 +117,7 @@ int main() /* test 1 */ if (!((9654 < n1) && (n1 < 10346))) { - printf("test 1 failed, X=%ld\n",n1); + printf("test 1 failed, X=%lu\n",n1); err++; } printf("test 1 done\n"); @@ -150,37 +150,37 @@ int main() { if (!((2267 < runs[i][0]) && (runs[i][0] < 2733))) { - printf("test 3 failed, bit=%d run=%d num=%ld\n", + printf("test 3 failed, bit=%d run=%d num=%lu\n", i,1,runs[i][0]); err++; } if (!((1079 < runs[i][1]) && (runs[i][1] < 1421))) { - printf("test 3 failed, bit=%d run=%d num=%ld\n", + printf("test 3 failed, bit=%d run=%d num=%lu\n", i,2,runs[i][1]); err++; } if (!(( 502 < runs[i][2]) && (runs[i][2] < 748))) { - printf("test 3 failed, bit=%d run=%d num=%ld\n", + printf("test 3 failed, bit=%d run=%d num=%lu\n", i,3,runs[i][2]); err++; } if (!(( 223 < runs[i][3]) && (runs[i][3] < 402))) { - printf("test 3 failed, bit=%d run=%d num=%ld\n", + printf("test 3 failed, bit=%d run=%d num=%lu\n", i,4,runs[i][3]); err++; } if (!(( 90 < runs[i][4]) && (runs[i][4] < 223))) { - printf("test 3 failed, bit=%d run=%d num=%ld\n", + printf("test 3 failed, bit=%d run=%d num=%lu\n", i,5,runs[i][4]); err++; } if (!(( 90 < runs[i][5]) && (runs[i][5] < 223))) { - printf("test 3 failed, bit=%d run=%d num=%ld\n", + printf("test 3 failed, bit=%d run=%d num=%lu\n", i,6,runs[i][5]); err++; } @@ -190,13 +190,13 @@ int main() /* test 4 */ if (runs[0][33] != 0) { - printf("test 4 failed, bit=%d run=%d num=%ld\n", + printf("test 4 failed, bit=%d run=%d num=%lu\n", 0,34,runs[0][33]); err++; } if (runs[1][33] != 0) { - printf("test 4 failed, bit=%d run=%d num=%ld\n", + printf("test 4 failed, bit=%d run=%d num=%lu\n", 1,34,runs[1][33]); err++; } |