diff options
author | beck <> | 2014-04-15 16:21:04 +0000 |
---|---|---|
committer | beck <> | 2014-04-15 16:21:04 +0000 |
commit | 8de0117e810bf2887ba81b54345d86f49dd504a8 (patch) | |
tree | 8c2058c07d3cdac3caf00950e53159c1c251f257 /src | |
parent | fd934c882a62cc862a41725de129e7a623ce16a3 (diff) | |
download | openbsd-8de0117e810bf2887ba81b54345d86f49dd504a8.tar.gz openbsd-8de0117e810bf2887ba81b54345d86f49dd504a8.tar.bz2 openbsd-8de0117e810bf2887ba81b54345d86f49dd504a8.zip |
Part 1 of eliminating BIO_snprintf(). This fixes mechanical conversions
where the return value is ignored changing to (void) snprintf.
ok deraadt@
Diffstat (limited to 'src')
56 files changed, 149 insertions, 149 deletions
diff --git a/src/lib/libcrypto/asn1/a_gentm.c b/src/lib/libcrypto/asn1/a_gentm.c index c79c6f538c..04266e790a 100644 --- a/src/lib/libcrypto/asn1/a_gentm.c +++ b/src/lib/libcrypto/asn1/a_gentm.c | |||
@@ -252,7 +252,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, | |||
252 | s->data=(unsigned char *)p; | 252 | s->data=(unsigned char *)p; |
253 | } | 253 | } |
254 | 254 | ||
255 | BIO_snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900, | 255 | (void) snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900, |
256 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); | 256 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); |
257 | s->length=strlen(p); | 257 | s->length=strlen(p); |
258 | s->type=V_ASN1_GENERALIZEDTIME; | 258 | s->type=V_ASN1_GENERALIZEDTIME; |
diff --git a/src/lib/libcrypto/asn1/a_mbstr.c b/src/lib/libcrypto/asn1/a_mbstr.c index 1538e0a4fc..264d8f677f 100644 --- a/src/lib/libcrypto/asn1/a_mbstr.c +++ b/src/lib/libcrypto/asn1/a_mbstr.c | |||
@@ -145,14 +145,14 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
145 | 145 | ||
146 | if((minsize > 0) && (nchar < minsize)) { | 146 | if((minsize > 0) && (nchar < minsize)) { |
147 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); | 147 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); |
148 | BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize); | 148 | (void) snprintf(strbuf, sizeof strbuf, "%ld", minsize); |
149 | ERR_add_error_data(2, "minsize=", strbuf); | 149 | ERR_add_error_data(2, "minsize=", strbuf); |
150 | return -1; | 150 | return -1; |
151 | } | 151 | } |
152 | 152 | ||
153 | if((maxsize > 0) && (nchar > maxsize)) { | 153 | if((maxsize > 0) && (nchar > maxsize)) { |
154 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); | 154 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); |
155 | BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize); | 155 | (void) snprintf(strbuf, sizeof strbuf, "%ld", maxsize); |
156 | ERR_add_error_data(2, "maxsize=", strbuf); | 156 | ERR_add_error_data(2, "maxsize=", strbuf); |
157 | return -1; | 157 | return -1; |
158 | } | 158 | } |
diff --git a/src/lib/libcrypto/asn1/a_strex.c b/src/lib/libcrypto/asn1/a_strex.c index ead37ac325..d1a587ccc1 100644 --- a/src/lib/libcrypto/asn1/a_strex.c +++ b/src/lib/libcrypto/asn1/a_strex.c | |||
@@ -125,12 +125,12 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch | |||
125 | if(c > 0xffffffffL) | 125 | if(c > 0xffffffffL) |
126 | return -1; | 126 | return -1; |
127 | if(c > 0xffff) { | 127 | if(c > 0xffff) { |
128 | BIO_snprintf(tmphex, sizeof tmphex, "\\W%08lX", c); | 128 | (void) snprintf(tmphex, sizeof tmphex, "\\W%08lX", c); |
129 | if(!io_ch(arg, tmphex, 10)) return -1; | 129 | if(!io_ch(arg, tmphex, 10)) return -1; |
130 | return 10; | 130 | return 10; |
131 | } | 131 | } |
132 | if(c > 0xff) { | 132 | if(c > 0xff) { |
133 | BIO_snprintf(tmphex, sizeof tmphex, "\\U%04lX", c); | 133 | (void) snprintf(tmphex, sizeof tmphex, "\\U%04lX", c); |
134 | if(!io_ch(arg, tmphex, 6)) return -1; | 134 | if(!io_ch(arg, tmphex, 6)) return -1; |
135 | return 6; | 135 | return 6; |
136 | } | 136 | } |
@@ -149,7 +149,7 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch | |||
149 | return 2; | 149 | return 2; |
150 | } | 150 | } |
151 | if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) { | 151 | if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) { |
152 | BIO_snprintf(tmphex, 11, "\\%02X", chtmp); | 152 | (void) snprintf(tmphex, 11, "\\%02X", chtmp); |
153 | if(!io_ch(arg, tmphex, 3)) return -1; | 153 | if(!io_ch(arg, tmphex, 3)) return -1; |
154 | return 3; | 154 | return 3; |
155 | } | 155 | } |
diff --git a/src/lib/libcrypto/asn1/a_utctm.c b/src/lib/libcrypto/asn1/a_utctm.c index 072e236592..615395b738 100644 --- a/src/lib/libcrypto/asn1/a_utctm.c +++ b/src/lib/libcrypto/asn1/a_utctm.c | |||
@@ -229,7 +229,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, | |||
229 | s->data=(unsigned char *)p; | 229 | s->data=(unsigned char *)p; |
230 | } | 230 | } |
231 | 231 | ||
232 | BIO_snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, | 232 | (void) snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, |
233 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); | 233 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); |
234 | s->length=strlen(p); | 234 | s->length=strlen(p); |
235 | s->type=V_ASN1_UTCTIME; | 235 | s->type=V_ASN1_UTCTIME; |
diff --git a/src/lib/libcrypto/asn1/asn1_lib.c b/src/lib/libcrypto/asn1/asn1_lib.c index 1bcb44aee2..4d1d6af18d 100644 --- a/src/lib/libcrypto/asn1/asn1_lib.c +++ b/src/lib/libcrypto/asn1/asn1_lib.c | |||
@@ -464,8 +464,8 @@ void asn1_add_error(const unsigned char *address, int offset) | |||
464 | { | 464 | { |
465 | char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1]; | 465 | char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1]; |
466 | 466 | ||
467 | BIO_snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address); | 467 | (void) snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address); |
468 | BIO_snprintf(buf2,sizeof buf2,"%d",offset); | 468 | (void) snprintf(buf2,sizeof buf2,"%d",offset); |
469 | ERR_add_error_data(4,"address=",buf1," offset=",buf2); | 469 | ERR_add_error_data(4,"address=",buf1," offset=",buf2); |
470 | } | 470 | } |
471 | 471 | ||
diff --git a/src/lib/libcrypto/asn1/asn1_par.c b/src/lib/libcrypto/asn1/asn1_par.c index aaca69aebd..29b0ba46b5 100644 --- a/src/lib/libcrypto/asn1/asn1_par.c +++ b/src/lib/libcrypto/asn1/asn1_par.c | |||
@@ -82,13 +82,13 @@ static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed, | |||
82 | 82 | ||
83 | p=str; | 83 | p=str; |
84 | if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) | 84 | if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) |
85 | BIO_snprintf(str,sizeof str,"priv [ %d ] ",tag); | 85 | (void) snprintf(str,sizeof str,"priv [ %d ] ",tag); |
86 | else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) | 86 | else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) |
87 | BIO_snprintf(str,sizeof str,"cont [ %d ]",tag); | 87 | (void) snprintf(str,sizeof str,"cont [ %d ]",tag); |
88 | else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) | 88 | else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) |
89 | BIO_snprintf(str,sizeof str,"appl [ %d ]",tag); | 89 | (void) snprintf(str,sizeof str,"appl [ %d ]",tag); |
90 | else if (tag > 30) | 90 | else if (tag > 30) |
91 | BIO_snprintf(str,sizeof str,"<ASN1 %d>",tag); | 91 | (void) snprintf(str,sizeof str,"<ASN1 %d>",tag); |
92 | else | 92 | else |
93 | p = ASN1_tag2str(tag); | 93 | p = ASN1_tag2str(tag); |
94 | 94 | ||
diff --git a/src/lib/libcrypto/bio/b_dump.c b/src/lib/libcrypto/bio/b_dump.c index c80ecc4295..492ee09275 100644 --- a/src/lib/libcrypto/bio/b_dump.c +++ b/src/lib/libcrypto/bio/b_dump.c | |||
@@ -107,7 +107,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
107 | { | 107 | { |
108 | buf[0]='\0'; /* start with empty string */ | 108 | buf[0]='\0'; /* start with empty string */ |
109 | BUF_strlcpy(buf,str,sizeof buf); | 109 | BUF_strlcpy(buf,str,sizeof buf); |
110 | BIO_snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width); | 110 | (void) snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width); |
111 | BUF_strlcat(buf,tmp,sizeof buf); | 111 | BUF_strlcat(buf,tmp,sizeof buf); |
112 | for(j=0;j<dump_width;j++) | 112 | for(j=0;j<dump_width;j++) |
113 | { | 113 | { |
@@ -118,7 +118,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
118 | else | 118 | else |
119 | { | 119 | { |
120 | ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; | 120 | ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; |
121 | BIO_snprintf(tmp,sizeof tmp,"%02x%c",ch, | 121 | (void) snprintf(tmp,sizeof tmp,"%02x%c",ch, |
122 | j==7?'-':' '); | 122 | j==7?'-':' '); |
123 | BUF_strlcat(buf,tmp,sizeof buf); | 123 | BUF_strlcat(buf,tmp,sizeof buf); |
124 | } | 124 | } |
@@ -130,10 +130,10 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
130 | break; | 130 | break; |
131 | ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; | 131 | ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; |
132 | #ifndef CHARSET_EBCDIC | 132 | #ifndef CHARSET_EBCDIC |
133 | BIO_snprintf(tmp,sizeof tmp,"%c", | 133 | (void) snprintf(tmp,sizeof tmp,"%c", |
134 | ((ch>=' ')&&(ch<='~'))?ch:'.'); | 134 | ((ch>=' ')&&(ch<='~'))?ch:'.'); |
135 | #else | 135 | #else |
136 | BIO_snprintf(tmp,sizeof tmp,"%c", | 136 | (void) snprintf(tmp,sizeof tmp,"%c", |
137 | ((ch>=os_toascii[' '])&&(ch<=os_toascii['~'])) | 137 | ((ch>=os_toascii[' '])&&(ch<=os_toascii['~'])) |
138 | ? os_toebcdic[ch] | 138 | ? os_toebcdic[ch] |
139 | : '.'); | 139 | : '.'); |
@@ -149,7 +149,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
149 | #ifdef TRUNCATE | 149 | #ifdef TRUNCATE |
150 | if (trc > 0) | 150 | if (trc > 0) |
151 | { | 151 | { |
152 | BIO_snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str, | 152 | (void) snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str, |
153 | len+trc); | 153 | len+trc); |
154 | ret+=cb((void *)buf,strlen(buf),u); | 154 | ret+=cb((void *)buf,strlen(buf),u); |
155 | } | 155 | } |
diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index 779acbaaf5..bd43307456 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c | |||
@@ -916,7 +916,7 @@ int BIO_accept(int sock, char **addr) | |||
916 | goto end; | 916 | goto end; |
917 | } | 917 | } |
918 | *addr = p; | 918 | *addr = p; |
919 | BIO_snprintf(*addr,nl,"%s:%s",h,s); | 919 | (void) snprintf(*addr,nl,"%s:%s",h,s); |
920 | goto end; | 920 | goto end; |
921 | } while(0); | 921 | } while(0); |
922 | #endif | 922 | #endif |
@@ -932,7 +932,7 @@ int BIO_accept(int sock, char **addr) | |||
932 | } | 932 | } |
933 | *addr=p; | 933 | *addr=p; |
934 | } | 934 | } |
935 | BIO_snprintf(*addr,24,"%d.%d.%d.%d:%d", | 935 | (void) snprintf(*addr,24,"%d.%d.%d.%d:%d", |
936 | (unsigned char)(l>>24L)&0xff, | 936 | (unsigned char)(l>>24L)&0xff, |
937 | (unsigned char)(l>>16L)&0xff, | 937 | (unsigned char)(l>>16L)&0xff, |
938 | (unsigned char)(l>> 8L)&0xff, | 938 | (unsigned char)(l>> 8L)&0xff, |
diff --git a/src/lib/libcrypto/bio/bio_cb.c b/src/lib/libcrypto/bio/bio_cb.c index 7334a254bf..78c8974ab4 100644 --- a/src/lib/libcrypto/bio/bio_cb.c +++ b/src/lib/libcrypto/bio/bio_cb.c | |||
@@ -75,60 +75,60 @@ long BIO_debug_callback(BIO *bio, int cmd, const char *argp, | |||
75 | if (BIO_CB_RETURN & cmd) | 75 | if (BIO_CB_RETURN & cmd) |
76 | r=ret; | 76 | r=ret; |
77 | 77 | ||
78 | BIO_snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio); | 78 | (void) snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio); |
79 | p= &(buf[14]); | 79 | p= &(buf[14]); |
80 | p_maxlen = sizeof buf - 14; | 80 | p_maxlen = sizeof buf - 14; |
81 | switch (cmd) | 81 | switch (cmd) |
82 | { | 82 | { |
83 | case BIO_CB_FREE: | 83 | case BIO_CB_FREE: |
84 | BIO_snprintf(p,p_maxlen,"Free - %s\n",bio->method->name); | 84 | (void) snprintf(p,p_maxlen,"Free - %s\n",bio->method->name); |
85 | break; | 85 | break; |
86 | case BIO_CB_READ: | 86 | case BIO_CB_READ: |
87 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) | 87 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) |
88 | BIO_snprintf(p,p_maxlen,"read(%d,%lu) - %s fd=%d\n", | 88 | (void) snprintf(p,p_maxlen,"read(%d,%lu) - %s fd=%d\n", |
89 | bio->num,(unsigned long)argi, | 89 | bio->num,(unsigned long)argi, |
90 | bio->method->name,bio->num); | 90 | bio->method->name,bio->num); |
91 | else | 91 | else |
92 | BIO_snprintf(p,p_maxlen,"read(%d,%lu) - %s\n", | 92 | (void) snprintf(p,p_maxlen,"read(%d,%lu) - %s\n", |
93 | bio->num,(unsigned long)argi, | 93 | bio->num,(unsigned long)argi, |
94 | bio->method->name); | 94 | bio->method->name); |
95 | break; | 95 | break; |
96 | case BIO_CB_WRITE: | 96 | case BIO_CB_WRITE: |
97 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) | 97 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) |
98 | BIO_snprintf(p,p_maxlen,"write(%d,%lu) - %s fd=%d\n", | 98 | (void) snprintf(p,p_maxlen,"write(%d,%lu) - %s fd=%d\n", |
99 | bio->num,(unsigned long)argi, | 99 | bio->num,(unsigned long)argi, |
100 | bio->method->name,bio->num); | 100 | bio->method->name,bio->num); |
101 | else | 101 | else |
102 | BIO_snprintf(p,p_maxlen,"write(%d,%lu) - %s\n", | 102 | (void) snprintf(p,p_maxlen,"write(%d,%lu) - %s\n", |
103 | bio->num,(unsigned long)argi, | 103 | bio->num,(unsigned long)argi, |
104 | bio->method->name); | 104 | bio->method->name); |
105 | break; | 105 | break; |
106 | case BIO_CB_PUTS: | 106 | case BIO_CB_PUTS: |
107 | BIO_snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name); | 107 | (void) snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name); |
108 | break; | 108 | break; |
109 | case BIO_CB_GETS: | 109 | case BIO_CB_GETS: |
110 | BIO_snprintf(p,p_maxlen,"gets(%lu) - %s\n",(unsigned long)argi,bio->method->name); | 110 | (void) snprintf(p,p_maxlen,"gets(%lu) - %s\n",(unsigned long)argi,bio->method->name); |
111 | break; | 111 | break; |
112 | case BIO_CB_CTRL: | 112 | case BIO_CB_CTRL: |
113 | BIO_snprintf(p,p_maxlen,"ctrl(%lu) - %s\n",(unsigned long)argi,bio->method->name); | 113 | (void) snprintf(p,p_maxlen,"ctrl(%lu) - %s\n",(unsigned long)argi,bio->method->name); |
114 | break; | 114 | break; |
115 | case BIO_CB_RETURN|BIO_CB_READ: | 115 | case BIO_CB_RETURN|BIO_CB_READ: |
116 | BIO_snprintf(p,p_maxlen,"read return %ld\n",ret); | 116 | (void) snprintf(p,p_maxlen,"read return %ld\n",ret); |
117 | break; | 117 | break; |
118 | case BIO_CB_RETURN|BIO_CB_WRITE: | 118 | case BIO_CB_RETURN|BIO_CB_WRITE: |
119 | BIO_snprintf(p,p_maxlen,"write return %ld\n",ret); | 119 | (void) snprintf(p,p_maxlen,"write return %ld\n",ret); |
120 | break; | 120 | break; |
121 | case BIO_CB_RETURN|BIO_CB_GETS: | 121 | case BIO_CB_RETURN|BIO_CB_GETS: |
122 | BIO_snprintf(p,p_maxlen,"gets return %ld\n",ret); | 122 | (void) snprintf(p,p_maxlen,"gets return %ld\n",ret); |
123 | break; | 123 | break; |
124 | case BIO_CB_RETURN|BIO_CB_PUTS: | 124 | case BIO_CB_RETURN|BIO_CB_PUTS: |
125 | BIO_snprintf(p,p_maxlen,"puts return %ld\n",ret); | 125 | (void) snprintf(p,p_maxlen,"puts return %ld\n",ret); |
126 | break; | 126 | break; |
127 | case BIO_CB_RETURN|BIO_CB_CTRL: | 127 | case BIO_CB_RETURN|BIO_CB_CTRL: |
128 | BIO_snprintf(p,p_maxlen,"ctrl return %ld\n",ret); | 128 | (void) snprintf(p,p_maxlen,"ctrl return %ld\n",ret); |
129 | break; | 129 | break; |
130 | default: | 130 | default: |
131 | BIO_snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd); | 131 | (void) snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd); |
132 | break; | 132 | break; |
133 | } | 133 | } |
134 | 134 | ||
diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c index 42ddf1f4aa..5162e75c87 100644 --- a/src/lib/libcrypto/bio/bss_conn.c +++ b/src/lib/libcrypto/bio/bss_conn.c | |||
@@ -521,7 +521,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
521 | char buf[16]; | 521 | char buf[16]; |
522 | unsigned char *p = ptr; | 522 | unsigned char *p = ptr; |
523 | 523 | ||
524 | BIO_snprintf(buf,sizeof buf,"%d.%d.%d.%d", | 524 | (void) snprintf(buf,sizeof buf,"%d.%d.%d.%d", |
525 | p[0],p[1],p[2],p[3]); | 525 | p[0],p[1],p[2],p[3]); |
526 | if (data->param_hostname != NULL) | 526 | if (data->param_hostname != NULL) |
527 | OPENSSL_free(data->param_hostname); | 527 | OPENSSL_free(data->param_hostname); |
@@ -532,7 +532,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
532 | { | 532 | { |
533 | char buf[DECIMAL_SIZE(int)+1]; | 533 | char buf[DECIMAL_SIZE(int)+1]; |
534 | 534 | ||
535 | BIO_snprintf(buf,sizeof buf,"%d",*(int *)ptr); | 535 | (void) snprintf(buf,sizeof buf,"%d",*(int *)ptr); |
536 | if (data->param_port != NULL) | 536 | if (data->param_port != NULL) |
537 | OPENSSL_free(data->param_port); | 537 | OPENSSL_free(data->param_port); |
538 | data->param_port=BUF_strdup(buf); | 538 | data->param_port=BUF_strdup(buf); |
diff --git a/src/lib/libcrypto/bn/bn_print.c b/src/lib/libcrypto/bn/bn_print.c index 1743b6a7e2..c7c407e494 100644 --- a/src/lib/libcrypto/bn/bn_print.c +++ b/src/lib/libcrypto/bn/bn_print.c | |||
@@ -147,12 +147,12 @@ char *BN_bn2dec(const BIGNUM *a) | |||
147 | /* We now have a series of blocks, BN_DEC_NUM chars | 147 | /* We now have a series of blocks, BN_DEC_NUM chars |
148 | * in length, where the last one needs truncation. | 148 | * in length, where the last one needs truncation. |
149 | * The blocks need to be reversed in order. */ | 149 | * The blocks need to be reversed in order. */ |
150 | BIO_snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp); | 150 | (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp); |
151 | while (*p) p++; | 151 | while (*p) p++; |
152 | while (lp != bn_data) | 152 | while (lp != bn_data) |
153 | { | 153 | { |
154 | lp--; | 154 | lp--; |
155 | BIO_snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp); | 155 | (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp); |
156 | while (*p) p++; | 156 | while (*p) p++; |
157 | } | 157 | } |
158 | } | 158 | } |
@@ -367,10 +367,10 @@ char *BN_options(void) | |||
367 | { | 367 | { |
368 | init++; | 368 | init++; |
369 | #ifdef BN_LLONG | 369 | #ifdef BN_LLONG |
370 | BIO_snprintf(data,sizeof data,"bn(%d,%d)", | 370 | (void) snprintf(data,sizeof data,"bn(%d,%d)", |
371 | (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); | 371 | (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); |
372 | #else | 372 | #else |
373 | BIO_snprintf(data,sizeof data,"bn(%d,%d)", | 373 | (void) snprintf(data,sizeof data,"bn(%d,%d)", |
374 | (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); | 374 | (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); |
375 | #endif | 375 | #endif |
376 | } | 376 | } |
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index cf951320af..15e5613e36 100644 --- a/src/lib/libcrypto/conf/conf_def.c +++ b/src/lib/libcrypto/conf/conf_def.c | |||
@@ -439,7 +439,7 @@ err: | |||
439 | if (buff != NULL) BUF_MEM_free(buff); | 439 | if (buff != NULL) BUF_MEM_free(buff); |
440 | if (section != NULL) OPENSSL_free(section); | 440 | if (section != NULL) OPENSSL_free(section); |
441 | if (line != NULL) *line=eline; | 441 | if (line != NULL) *line=eline; |
442 | BIO_snprintf(btmp,sizeof btmp,"%ld",eline); | 442 | (void) snprintf(btmp,sizeof btmp,"%ld",eline); |
443 | ERR_add_error_data(2,"line ",btmp); | 443 | ERR_add_error_data(2,"line ",btmp); |
444 | if ((h != conf->data) && (conf->data != NULL)) | 444 | if ((h != conf->data) && (conf->data != NULL)) |
445 | { | 445 | { |
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c index df1642a0a5..994294f655 100644 --- a/src/lib/libcrypto/conf/conf_mod.c +++ b/src/lib/libcrypto/conf/conf_mod.c | |||
@@ -233,7 +233,7 @@ static int module_run(const CONF *cnf, char *name, char *value, | |||
233 | { | 233 | { |
234 | char rcode[DECIMAL_SIZE(ret)+1]; | 234 | char rcode[DECIMAL_SIZE(ret)+1]; |
235 | CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR); | 235 | CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR); |
236 | BIO_snprintf(rcode, sizeof rcode, "%-8d", ret); | 236 | (void) snprintf(rcode, sizeof rcode, "%-8d", ret); |
237 | ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); | 237 | ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); |
238 | } | 238 | } |
239 | } | 239 | } |
diff --git a/src/lib/libcrypto/cversion.c b/src/lib/libcrypto/cversion.c index 1fe92a4bfa..4bbe74bd5b 100644 --- a/src/lib/libcrypto/cversion.c +++ b/src/lib/libcrypto/cversion.c | |||
@@ -71,7 +71,7 @@ const char | |||
71 | #ifdef DATE | 71 | #ifdef DATE |
72 | static char buf[sizeof(DATE) + 11]; | 72 | static char buf[sizeof(DATE) + 11]; |
73 | 73 | ||
74 | BIO_snprintf(buf, sizeof buf, "built on: %s", DATE); | 74 | (void) snprintf(buf, sizeof buf, "built on: %s", DATE); |
75 | return (buf); | 75 | return (buf); |
76 | #else | 76 | #else |
77 | return("built on: date not available"); | 77 | return("built on: date not available"); |
@@ -81,7 +81,7 @@ const char | |||
81 | #ifdef CFLAGS | 81 | #ifdef CFLAGS |
82 | static char buf[sizeof(CFLAGS) + 11]; | 82 | static char buf[sizeof(CFLAGS) + 11]; |
83 | 83 | ||
84 | BIO_snprintf(buf, sizeof buf, "compiler: %s", CFLAGS); | 84 | (void) snprintf(buf, sizeof buf, "compiler: %s", CFLAGS); |
85 | return (buf); | 85 | return (buf); |
86 | #else | 86 | #else |
87 | return("compiler: information not available"); | 87 | return("compiler: information not available"); |
@@ -91,7 +91,7 @@ const char | |||
91 | #ifdef PLATFORM | 91 | #ifdef PLATFORM |
92 | static char buf[sizeof(PLATFORM) + 11]; | 92 | static char buf[sizeof(PLATFORM) + 11]; |
93 | 93 | ||
94 | BIO_snprintf(buf, sizeof buf, "platform: %s", PLATFORM); | 94 | (void) snprintf(buf, sizeof buf, "platform: %s", PLATFORM); |
95 | return (buf); | 95 | return (buf); |
96 | #else | 96 | #else |
97 | return("platform: information not available"); | 97 | return("platform: information not available"); |
diff --git a/src/lib/libcrypto/des/ecb_enc.c b/src/lib/libcrypto/des/ecb_enc.c index 0684e769b3..b83fca71db 100644 --- a/src/lib/libcrypto/des/ecb_enc.c +++ b/src/lib/libcrypto/des/ecb_enc.c | |||
@@ -97,7 +97,7 @@ const char *DES_options(void) | |||
97 | size="int"; | 97 | size="int"; |
98 | else | 98 | else |
99 | size="long"; | 99 | size="long"; |
100 | BIO_snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll, | 100 | (void) snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll, |
101 | size); | 101 | size); |
102 | init=0; | 102 | init=0; |
103 | } | 103 | } |
diff --git a/src/lib/libcrypto/engine/eng_padlock.c b/src/lib/libcrypto/engine/eng_padlock.c index 9f7a85a8da..d1fc8d9315 100644 --- a/src/lib/libcrypto/engine/eng_padlock.c +++ b/src/lib/libcrypto/engine/eng_padlock.c | |||
@@ -178,7 +178,7 @@ padlock_bind_helper(ENGINE *e) | |||
178 | #endif | 178 | #endif |
179 | 179 | ||
180 | /* Generate a nice engine name with available features */ | 180 | /* Generate a nice engine name with available features */ |
181 | BIO_snprintf(padlock_name, sizeof(padlock_name), | 181 | (void) snprintf(padlock_name, sizeof(padlock_name), |
182 | "VIA PadLock (%s, %s)", | 182 | "VIA PadLock (%s, %s)", |
183 | padlock_use_rng ? "RNG" : "no-RNG", | 183 | padlock_use_rng ? "RNG" : "no-RNG", |
184 | padlock_use_ace ? "ACE" : "no-ACE"); | 184 | padlock_use_ace ? "ACE" : "no-ACE"); |
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c index 0251248baf..ae9a209ad7 100644 --- a/src/lib/libcrypto/err/err.c +++ b/src/lib/libcrypto/err/err.c | |||
@@ -872,13 +872,13 @@ void ERR_error_string_n(unsigned long e, char *buf, size_t len) | |||
872 | rs=ERR_reason_error_string(e); | 872 | rs=ERR_reason_error_string(e); |
873 | 873 | ||
874 | if (ls == NULL) | 874 | if (ls == NULL) |
875 | BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l); | 875 | (void) snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l); |
876 | if (fs == NULL) | 876 | if (fs == NULL) |
877 | BIO_snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f); | 877 | (void) snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f); |
878 | if (rs == NULL) | 878 | if (rs == NULL) |
879 | BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); | 879 | (void) snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); |
880 | 880 | ||
881 | BIO_snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, | 881 | (void) snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, |
882 | fs?fs:fsbuf, rs?rs:rsbuf); | 882 | fs?fs:fsbuf, rs?rs:rsbuf); |
883 | if (strlen(buf) == len-1) | 883 | if (strlen(buf) == len-1) |
884 | { | 884 | { |
diff --git a/src/lib/libcrypto/err/err_prn.c b/src/lib/libcrypto/err/err_prn.c index a0168ac8ed..7374c0abe7 100644 --- a/src/lib/libcrypto/err/err_prn.c +++ b/src/lib/libcrypto/err/err_prn.c | |||
@@ -79,7 +79,7 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), | |||
79 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) | 79 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) |
80 | { | 80 | { |
81 | ERR_error_string_n(l, buf, sizeof buf); | 81 | ERR_error_string_n(l, buf, sizeof buf); |
82 | BIO_snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf, | 82 | (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf, |
83 | file, line, (flags & ERR_TXT_STRING) ? data : ""); | 83 | file, line, (flags & ERR_TXT_STRING) ? data : ""); |
84 | if (cb(buf2, strlen(buf2), u) <= 0) | 84 | if (cb(buf2, strlen(buf2), u) <= 0) |
85 | break; /* abort outputting the error report */ | 85 | break; /* abort outputting the error report */ |
diff --git a/src/lib/libcrypto/mem_dbg.c b/src/lib/libcrypto/mem_dbg.c index 9324ec4c7d..944c3d9a61 100644 --- a/src/lib/libcrypto/mem_dbg.c +++ b/src/lib/libcrypto/mem_dbg.c | |||
@@ -665,22 +665,22 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l) | |||
665 | if (options & V_CRYPTO_MDEBUG_TIME) { | 665 | if (options & V_CRYPTO_MDEBUG_TIME) { |
666 | lcl = localtime(&m->time); | 666 | lcl = localtime(&m->time); |
667 | 667 | ||
668 | BIO_snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ", | 668 | (void) snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ", |
669 | lcl->tm_hour, lcl->tm_min, lcl->tm_sec); | 669 | lcl->tm_hour, lcl->tm_min, lcl->tm_sec); |
670 | bufp += strlen(bufp); | 670 | bufp += strlen(bufp); |
671 | } | 671 | } |
672 | 672 | ||
673 | BIO_snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ", | 673 | (void) snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ", |
674 | m->order, m->file, m->line); | 674 | m->order, m->file, m->line); |
675 | bufp += strlen(bufp); | 675 | bufp += strlen(bufp); |
676 | 676 | ||
677 | if (options & V_CRYPTO_MDEBUG_THREAD) { | 677 | if (options & V_CRYPTO_MDEBUG_THREAD) { |
678 | BIO_snprintf(bufp, BUF_REMAIN, "thread=%lu, ", | 678 | (void) snprintf(bufp, BUF_REMAIN, "thread=%lu, ", |
679 | CRYPTO_THREADID_hash(&m->threadid)); | 679 | CRYPTO_THREADID_hash(&m->threadid)); |
680 | bufp += strlen(bufp); | 680 | bufp += strlen(bufp); |
681 | } | 681 | } |
682 | 682 | ||
683 | BIO_snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n", | 683 | (void) snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n", |
684 | m->num,(unsigned long)m->addr); | 684 | m->num,(unsigned long)m->addr); |
685 | bufp += strlen(bufp); | 685 | bufp += strlen(bufp); |
686 | 686 | ||
@@ -701,7 +701,7 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l) | |||
701 | 701 | ||
702 | ami_cnt++; | 702 | ami_cnt++; |
703 | memset(buf, '>', ami_cnt); | 703 | memset(buf, '>', ami_cnt); |
704 | BIO_snprintf(buf + ami_cnt, sizeof buf - ami_cnt, | 704 | (void) snprintf(buf + ami_cnt, sizeof buf - ami_cnt, |
705 | " thread=%lu, file=%s, line=%d, info=\"", | 705 | " thread=%lu, file=%s, line=%d, info=\"", |
706 | CRYPTO_THREADID_hash(&amip->threadid), amip->file, | 706 | CRYPTO_THREADID_hash(&amip->threadid), amip->file, |
707 | amip->line); | 707 | amip->line); |
@@ -715,7 +715,7 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l) | |||
715 | sizeof buf - buf_len); | 715 | sizeof buf - buf_len); |
716 | buf_len = strlen(buf); | 716 | buf_len = strlen(buf); |
717 | } | 717 | } |
718 | BIO_snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n"); | 718 | (void) snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n"); |
719 | 719 | ||
720 | BIO_puts(l->bio, buf); | 720 | BIO_puts(l->bio, buf); |
721 | 721 | ||
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index 99646c300c..a597284c80 100644 --- a/src/lib/libcrypto/objects/obj_dat.c +++ b/src/lib/libcrypto/objects/obj_dat.c | |||
@@ -594,7 +594,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) | |||
594 | } | 594 | } |
595 | else | 595 | else |
596 | { | 596 | { |
597 | BIO_snprintf(tbuf,sizeof tbuf,".%lu",l); | 597 | (void) snprintf(tbuf,sizeof tbuf,".%lu",l); |
598 | i=strlen(tbuf); | 598 | i=strlen(tbuf); |
599 | if (buf && (buf_len > 0)) | 599 | if (buf && (buf_len > 0)) |
600 | { | 600 | { |
diff --git a/src/lib/libcrypto/pem/pem_pkey.c b/src/lib/libcrypto/pem/pem_pkey.c index 8ecf24903b..ef152be264 100644 --- a/src/lib/libcrypto/pem/pem_pkey.c +++ b/src/lib/libcrypto/pem/pem_pkey.c | |||
@@ -147,7 +147,7 @@ int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, | |||
147 | (char *)kstr, klen, | 147 | (char *)kstr, klen, |
148 | cb, u); | 148 | cb, u); |
149 | 149 | ||
150 | BIO_snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); | 150 | (void) snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); |
151 | return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, | 151 | return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, |
152 | pem_str,bp,x,enc,kstr,klen,cb,u); | 152 | pem_str,bp,x,enc,kstr,klen,cb,u); |
153 | } | 153 | } |
@@ -199,7 +199,7 @@ int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x) | |||
199 | if (!x->ameth || !x->ameth->param_encode) | 199 | if (!x->ameth || !x->ameth->param_encode) |
200 | return 0; | 200 | return 0; |
201 | 201 | ||
202 | BIO_snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str); | 202 | (void) snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str); |
203 | return PEM_ASN1_write_bio( | 203 | return PEM_ASN1_write_bio( |
204 | (i2d_of_void *)x->ameth->param_encode, | 204 | (i2d_of_void *)x->ameth->param_encode, |
205 | pem_str,bp,x,NULL,NULL,0,0,NULL); | 205 | pem_str,bp,x,NULL,NULL,0,0,NULL); |
diff --git a/src/lib/libcrypto/ui/ui_lib.c b/src/lib/libcrypto/ui/ui_lib.c index a8abc27064..6113060aa9 100644 --- a/src/lib/libcrypto/ui/ui_lib.c +++ b/src/lib/libcrypto/ui/ui_lib.c | |||
@@ -858,9 +858,9 @@ int UI_set_result(UI *ui, UI_STRING *uis, const char *result) | |||
858 | char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize)+1]; | 858 | char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize)+1]; |
859 | char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize)+1]; | 859 | char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize)+1]; |
860 | 860 | ||
861 | BIO_snprintf(number1, sizeof(number1), "%d", | 861 | (void) snprintf(number1, sizeof(number1), "%d", |
862 | uis->_.string_data.result_minsize); | 862 | uis->_.string_data.result_minsize); |
863 | BIO_snprintf(number2, sizeof(number2), "%d", | 863 | (void) snprintf(number2, sizeof(number2), "%d", |
864 | uis->_.string_data.result_maxsize); | 864 | uis->_.string_data.result_maxsize); |
865 | 865 | ||
866 | if (l < uis->_.string_data.result_minsize) | 866 | if (l < uis->_.string_data.result_minsize) |
diff --git a/src/lib/libcrypto/x509/by_dir.c b/src/lib/libcrypto/x509/by_dir.c index c6602dae4f..f9d55c4e6d 100644 --- a/src/lib/libcrypto/x509/by_dir.c +++ b/src/lib/libcrypto/x509/by_dir.c | |||
@@ -379,13 +379,13 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, | |||
379 | { | 379 | { |
380 | /* This is special. When c == '\0', no | 380 | /* This is special. When c == '\0', no |
381 | directory separator should be added. */ | 381 | directory separator should be added. */ |
382 | BIO_snprintf(b->data,b->max, | 382 | (void) snprintf(b->data,b->max, |
383 | "%s%08lx.%s%d",ent->dir,h, | 383 | "%s%08lx.%s%d",ent->dir,h, |
384 | postfix,k); | 384 | postfix,k); |
385 | } | 385 | } |
386 | else | 386 | else |
387 | { | 387 | { |
388 | BIO_snprintf(b->data,b->max, | 388 | (void) snprintf(b->data,b->max, |
389 | "%s%c%08lx.%s%d",ent->dir,c,h, | 389 | "%s%c%08lx.%s%d",ent->dir,c,h, |
390 | postfix,k); | 390 | postfix,k); |
391 | } | 391 | } |
diff --git a/src/lib/libcrypto/x509/x509_txt.c b/src/lib/libcrypto/x509/x509_txt.c index c44f753c46..27f6c7176a 100644 --- a/src/lib/libcrypto/x509/x509_txt.c +++ b/src/lib/libcrypto/x509/x509_txt.c | |||
@@ -185,7 +185,7 @@ const char *X509_verify_cert_error_string(long n) | |||
185 | return("CRL path validation error"); | 185 | return("CRL path validation error"); |
186 | 186 | ||
187 | default: | 187 | default: |
188 | BIO_snprintf(buf,sizeof buf,"error number %ld",n); | 188 | (void) snprintf(buf,sizeof buf,"error number %ld",n); |
189 | return(buf); | 189 | return(buf); |
190 | } | 190 | } |
191 | } | 191 | } |
diff --git a/src/lib/libcrypto/x509v3/v3_alt.c b/src/lib/libcrypto/x509v3/v3_alt.c index 91aefcddc1..66ea96db51 100644 --- a/src/lib/libcrypto/x509v3/v3_alt.c +++ b/src/lib/libcrypto/x509v3/v3_alt.c | |||
@@ -143,14 +143,14 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, | |||
143 | case GEN_IPADD: | 143 | case GEN_IPADD: |
144 | p = gen->d.ip->data; | 144 | p = gen->d.ip->data; |
145 | if(gen->d.ip->length == 4) | 145 | if(gen->d.ip->length == 4) |
146 | BIO_snprintf(oline, sizeof oline, | 146 | (void) snprintf(oline, sizeof oline, |
147 | "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); | 147 | "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); |
148 | else if(gen->d.ip->length == 16) | 148 | else if(gen->d.ip->length == 16) |
149 | { | 149 | { |
150 | oline[0] = 0; | 150 | oline[0] = 0; |
151 | for (i = 0; i < 8; i++) | 151 | for (i = 0; i < 8; i++) |
152 | { | 152 | { |
153 | BIO_snprintf(htmp, sizeof htmp, | 153 | (void) snprintf(htmp, sizeof htmp, |
154 | "%X", p[0] << 8 | p[1]); | 154 | "%X", p[0] << 8 | p[1]); |
155 | p += 2; | 155 | p += 2; |
156 | strlcat(oline, htmp, sizeof(oline)); | 156 | strlcat(oline, htmp, sizeof(oline)); |
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c index 70e6acad4f..c9a7b6cf07 100644 --- a/src/lib/libssl/s3_pkt.c +++ b/src/lib/libssl/s3_pkt.c | |||
@@ -1161,7 +1161,7 @@ start: | |||
1161 | s->rwstate = SSL_NOTHING; | 1161 | s->rwstate = SSL_NOTHING; |
1162 | s->s3->fatal_alert = alert_descr; | 1162 | s->s3->fatal_alert = alert_descr; |
1163 | SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr); | 1163 | SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr); |
1164 | BIO_snprintf(tmp, sizeof tmp, "%d", alert_descr); | 1164 | (void) snprintf(tmp, sizeof tmp, "%d", alert_descr); |
1165 | ERR_add_error_data(2, "SSL alert number ", tmp); | 1165 | ERR_add_error_data(2, "SSL alert number ", tmp); |
1166 | s->shutdown|=SSL_RECEIVED_SHUTDOWN; | 1166 | s->shutdown|=SSL_RECEIVED_SHUTDOWN; |
1167 | SSL_CTX_remove_session(s->ctx, s->session); | 1167 | SSL_CTX_remove_session(s->ctx, s->session); |
diff --git a/src/lib/libssl/src/apps/ca.c b/src/lib/libssl/src/apps/ca.c index b07cf97256..6f37e029ac 100644 --- a/src/lib/libssl/src/apps/ca.c +++ b/src/lib/libssl/src/apps/ca.c | |||
@@ -1330,7 +1330,7 @@ bad: | |||
1330 | { | 1330 | { |
1331 | if (n >= &(buf[2][sizeof(buf[2])])) | 1331 | if (n >= &(buf[2][sizeof(buf[2])])) |
1332 | break; | 1332 | break; |
1333 | BIO_snprintf(n, | 1333 | (void) snprintf(n, |
1334 | &buf[2][0] + sizeof(buf[2]) - n, | 1334 | &buf[2][0] + sizeof(buf[2]) - n, |
1335 | "%02X",(unsigned char)*(p++)); | 1335 | "%02X",(unsigned char)*(p++)); |
1336 | n+=2; | 1336 | n+=2; |
diff --git a/src/lib/libssl/src/apps/enc.c b/src/lib/libssl/src/apps/enc.c index 719acc3250..ab974893be 100644 --- a/src/lib/libssl/src/apps/enc.c +++ b/src/lib/libssl/src/apps/enc.c | |||
@@ -425,7 +425,7 @@ bad: | |||
425 | { | 425 | { |
426 | char buf[200]; | 426 | char buf[200]; |
427 | 427 | ||
428 | BIO_snprintf(buf,sizeof buf,"enter %s %s password:", | 428 | (void) snprintf(buf,sizeof buf,"enter %s %s password:", |
429 | OBJ_nid2ln(EVP_CIPHER_nid(cipher)), | 429 | OBJ_nid2ln(EVP_CIPHER_nid(cipher)), |
430 | (enc)?"encryption":"decryption"); | 430 | (enc)?"encryption":"decryption"); |
431 | strbuf[0]='\0'; | 431 | strbuf[0]='\0'; |
diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c index 8e2cc4d196..f1f412887d 100644 --- a/src/lib/libssl/src/apps/req.c +++ b/src/lib/libssl/src/apps/req.c | |||
@@ -1271,21 +1271,21 @@ start: for (;;) | |||
1271 | def=""; | 1271 | def=""; |
1272 | } | 1272 | } |
1273 | 1273 | ||
1274 | BIO_snprintf(buf,sizeof buf,"%s_value",v->name); | 1274 | (void) snprintf(buf,sizeof buf,"%s_value",v->name); |
1275 | if ((value=NCONF_get_string(req_conf,dn_sect,buf)) == NULL) | 1275 | if ((value=NCONF_get_string(req_conf,dn_sect,buf)) == NULL) |
1276 | { | 1276 | { |
1277 | ERR_clear_error(); | 1277 | ERR_clear_error(); |
1278 | value=NULL; | 1278 | value=NULL; |
1279 | } | 1279 | } |
1280 | 1280 | ||
1281 | BIO_snprintf(buf,sizeof buf,"%s_min",v->name); | 1281 | (void) snprintf(buf,sizeof buf,"%s_min",v->name); |
1282 | if (!NCONF_get_number(req_conf,dn_sect,buf, &n_min)) | 1282 | if (!NCONF_get_number(req_conf,dn_sect,buf, &n_min)) |
1283 | { | 1283 | { |
1284 | ERR_clear_error(); | 1284 | ERR_clear_error(); |
1285 | n_min = -1; | 1285 | n_min = -1; |
1286 | } | 1286 | } |
1287 | 1287 | ||
1288 | BIO_snprintf(buf,sizeof buf,"%s_max",v->name); | 1288 | (void) snprintf(buf,sizeof buf,"%s_max",v->name); |
1289 | if (!NCONF_get_number(req_conf,dn_sect,buf, &n_max)) | 1289 | if (!NCONF_get_number(req_conf,dn_sect,buf, &n_max)) |
1290 | { | 1290 | { |
1291 | ERR_clear_error(); | 1291 | ERR_clear_error(); |
@@ -1338,7 +1338,7 @@ start2: for (;;) | |||
1338 | } | 1338 | } |
1339 | 1339 | ||
1340 | 1340 | ||
1341 | BIO_snprintf(buf,sizeof buf,"%s_value",type); | 1341 | (void) snprintf(buf,sizeof buf,"%s_value",type); |
1342 | if ((value=NCONF_get_string(req_conf,attr_sect,buf)) | 1342 | if ((value=NCONF_get_string(req_conf,attr_sect,buf)) |
1343 | == NULL) | 1343 | == NULL) |
1344 | { | 1344 | { |
diff --git a/src/lib/libssl/src/apps/s_time.c b/src/lib/libssl/src/apps/s_time.c index 8a5e0761f7..cda06bba59 100644 --- a/src/lib/libssl/src/apps/s_time.c +++ b/src/lib/libssl/src/apps/s_time.c | |||
@@ -410,7 +410,7 @@ int MAIN(int argc, char **argv) | |||
410 | 410 | ||
411 | if (s_www_path != NULL) | 411 | if (s_www_path != NULL) |
412 | { | 412 | { |
413 | BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path); | 413 | (void) snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path); |
414 | SSL_write(scon,buf,strlen(buf)); | 414 | SSL_write(scon,buf,strlen(buf)); |
415 | while ((i=SSL_read(scon,buf,sizeof(buf))) > 0) | 415 | while ((i=SSL_read(scon,buf,sizeof(buf))) > 0) |
416 | bytes_read+=i; | 416 | bytes_read+=i; |
@@ -466,7 +466,7 @@ next: | |||
466 | 466 | ||
467 | if (s_www_path != NULL) | 467 | if (s_www_path != NULL) |
468 | { | 468 | { |
469 | BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path); | 469 | (void) snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path); |
470 | SSL_write(scon,buf,strlen(buf)); | 470 | SSL_write(scon,buf,strlen(buf)); |
471 | while (SSL_read(scon,buf,sizeof(buf)) > 0) | 471 | while (SSL_read(scon,buf,sizeof(buf)) > 0) |
472 | ; | 472 | ; |
@@ -505,7 +505,7 @@ next: | |||
505 | 505 | ||
506 | if (s_www_path) | 506 | if (s_www_path) |
507 | { | 507 | { |
508 | BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path); | 508 | (void) snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path); |
509 | SSL_write(scon,buf,strlen(buf)); | 509 | SSL_write(scon,buf,strlen(buf)); |
510 | while ((i=SSL_read(scon,buf,sizeof(buf))) > 0) | 510 | while ((i=SSL_read(scon,buf,sizeof(buf))) > 0) |
511 | bytes_read+=i; | 511 | bytes_read+=i; |
diff --git a/src/lib/libssl/src/crypto/asn1/a_gentm.c b/src/lib/libssl/src/crypto/asn1/a_gentm.c index c79c6f538c..04266e790a 100644 --- a/src/lib/libssl/src/crypto/asn1/a_gentm.c +++ b/src/lib/libssl/src/crypto/asn1/a_gentm.c | |||
@@ -252,7 +252,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, | |||
252 | s->data=(unsigned char *)p; | 252 | s->data=(unsigned char *)p; |
253 | } | 253 | } |
254 | 254 | ||
255 | BIO_snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900, | 255 | (void) snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900, |
256 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); | 256 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); |
257 | s->length=strlen(p); | 257 | s->length=strlen(p); |
258 | s->type=V_ASN1_GENERALIZEDTIME; | 258 | s->type=V_ASN1_GENERALIZEDTIME; |
diff --git a/src/lib/libssl/src/crypto/asn1/a_mbstr.c b/src/lib/libssl/src/crypto/asn1/a_mbstr.c index 1538e0a4fc..264d8f677f 100644 --- a/src/lib/libssl/src/crypto/asn1/a_mbstr.c +++ b/src/lib/libssl/src/crypto/asn1/a_mbstr.c | |||
@@ -145,14 +145,14 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
145 | 145 | ||
146 | if((minsize > 0) && (nchar < minsize)) { | 146 | if((minsize > 0) && (nchar < minsize)) { |
147 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); | 147 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); |
148 | BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize); | 148 | (void) snprintf(strbuf, sizeof strbuf, "%ld", minsize); |
149 | ERR_add_error_data(2, "minsize=", strbuf); | 149 | ERR_add_error_data(2, "minsize=", strbuf); |
150 | return -1; | 150 | return -1; |
151 | } | 151 | } |
152 | 152 | ||
153 | if((maxsize > 0) && (nchar > maxsize)) { | 153 | if((maxsize > 0) && (nchar > maxsize)) { |
154 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); | 154 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); |
155 | BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize); | 155 | (void) snprintf(strbuf, sizeof strbuf, "%ld", maxsize); |
156 | ERR_add_error_data(2, "maxsize=", strbuf); | 156 | ERR_add_error_data(2, "maxsize=", strbuf); |
157 | return -1; | 157 | return -1; |
158 | } | 158 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_strex.c b/src/lib/libssl/src/crypto/asn1/a_strex.c index ead37ac325..d1a587ccc1 100644 --- a/src/lib/libssl/src/crypto/asn1/a_strex.c +++ b/src/lib/libssl/src/crypto/asn1/a_strex.c | |||
@@ -125,12 +125,12 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch | |||
125 | if(c > 0xffffffffL) | 125 | if(c > 0xffffffffL) |
126 | return -1; | 126 | return -1; |
127 | if(c > 0xffff) { | 127 | if(c > 0xffff) { |
128 | BIO_snprintf(tmphex, sizeof tmphex, "\\W%08lX", c); | 128 | (void) snprintf(tmphex, sizeof tmphex, "\\W%08lX", c); |
129 | if(!io_ch(arg, tmphex, 10)) return -1; | 129 | if(!io_ch(arg, tmphex, 10)) return -1; |
130 | return 10; | 130 | return 10; |
131 | } | 131 | } |
132 | if(c > 0xff) { | 132 | if(c > 0xff) { |
133 | BIO_snprintf(tmphex, sizeof tmphex, "\\U%04lX", c); | 133 | (void) snprintf(tmphex, sizeof tmphex, "\\U%04lX", c); |
134 | if(!io_ch(arg, tmphex, 6)) return -1; | 134 | if(!io_ch(arg, tmphex, 6)) return -1; |
135 | return 6; | 135 | return 6; |
136 | } | 136 | } |
@@ -149,7 +149,7 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch | |||
149 | return 2; | 149 | return 2; |
150 | } | 150 | } |
151 | if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) { | 151 | if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) { |
152 | BIO_snprintf(tmphex, 11, "\\%02X", chtmp); | 152 | (void) snprintf(tmphex, 11, "\\%02X", chtmp); |
153 | if(!io_ch(arg, tmphex, 3)) return -1; | 153 | if(!io_ch(arg, tmphex, 3)) return -1; |
154 | return 3; | 154 | return 3; |
155 | } | 155 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_utctm.c b/src/lib/libssl/src/crypto/asn1/a_utctm.c index 072e236592..615395b738 100644 --- a/src/lib/libssl/src/crypto/asn1/a_utctm.c +++ b/src/lib/libssl/src/crypto/asn1/a_utctm.c | |||
@@ -229,7 +229,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, | |||
229 | s->data=(unsigned char *)p; | 229 | s->data=(unsigned char *)p; |
230 | } | 230 | } |
231 | 231 | ||
232 | BIO_snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, | 232 | (void) snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, |
233 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); | 233 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); |
234 | s->length=strlen(p); | 234 | s->length=strlen(p); |
235 | s->type=V_ASN1_UTCTIME; | 235 | s->type=V_ASN1_UTCTIME; |
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_lib.c b/src/lib/libssl/src/crypto/asn1/asn1_lib.c index 1bcb44aee2..4d1d6af18d 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1_lib.c +++ b/src/lib/libssl/src/crypto/asn1/asn1_lib.c | |||
@@ -464,8 +464,8 @@ void asn1_add_error(const unsigned char *address, int offset) | |||
464 | { | 464 | { |
465 | char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1]; | 465 | char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1]; |
466 | 466 | ||
467 | BIO_snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address); | 467 | (void) snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address); |
468 | BIO_snprintf(buf2,sizeof buf2,"%d",offset); | 468 | (void) snprintf(buf2,sizeof buf2,"%d",offset); |
469 | ERR_add_error_data(4,"address=",buf1," offset=",buf2); | 469 | ERR_add_error_data(4,"address=",buf1," offset=",buf2); |
470 | } | 470 | } |
471 | 471 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_par.c b/src/lib/libssl/src/crypto/asn1/asn1_par.c index aaca69aebd..29b0ba46b5 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1_par.c +++ b/src/lib/libssl/src/crypto/asn1/asn1_par.c | |||
@@ -82,13 +82,13 @@ static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed, | |||
82 | 82 | ||
83 | p=str; | 83 | p=str; |
84 | if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) | 84 | if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE) |
85 | BIO_snprintf(str,sizeof str,"priv [ %d ] ",tag); | 85 | (void) snprintf(str,sizeof str,"priv [ %d ] ",tag); |
86 | else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) | 86 | else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC) |
87 | BIO_snprintf(str,sizeof str,"cont [ %d ]",tag); | 87 | (void) snprintf(str,sizeof str,"cont [ %d ]",tag); |
88 | else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) | 88 | else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION) |
89 | BIO_snprintf(str,sizeof str,"appl [ %d ]",tag); | 89 | (void) snprintf(str,sizeof str,"appl [ %d ]",tag); |
90 | else if (tag > 30) | 90 | else if (tag > 30) |
91 | BIO_snprintf(str,sizeof str,"<ASN1 %d>",tag); | 91 | (void) snprintf(str,sizeof str,"<ASN1 %d>",tag); |
92 | else | 92 | else |
93 | p = ASN1_tag2str(tag); | 93 | p = ASN1_tag2str(tag); |
94 | 94 | ||
diff --git a/src/lib/libssl/src/crypto/bio/b_dump.c b/src/lib/libssl/src/crypto/bio/b_dump.c index c80ecc4295..492ee09275 100644 --- a/src/lib/libssl/src/crypto/bio/b_dump.c +++ b/src/lib/libssl/src/crypto/bio/b_dump.c | |||
@@ -107,7 +107,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
107 | { | 107 | { |
108 | buf[0]='\0'; /* start with empty string */ | 108 | buf[0]='\0'; /* start with empty string */ |
109 | BUF_strlcpy(buf,str,sizeof buf); | 109 | BUF_strlcpy(buf,str,sizeof buf); |
110 | BIO_snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width); | 110 | (void) snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width); |
111 | BUF_strlcat(buf,tmp,sizeof buf); | 111 | BUF_strlcat(buf,tmp,sizeof buf); |
112 | for(j=0;j<dump_width;j++) | 112 | for(j=0;j<dump_width;j++) |
113 | { | 113 | { |
@@ -118,7 +118,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
118 | else | 118 | else |
119 | { | 119 | { |
120 | ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; | 120 | ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; |
121 | BIO_snprintf(tmp,sizeof tmp,"%02x%c",ch, | 121 | (void) snprintf(tmp,sizeof tmp,"%02x%c",ch, |
122 | j==7?'-':' '); | 122 | j==7?'-':' '); |
123 | BUF_strlcat(buf,tmp,sizeof buf); | 123 | BUF_strlcat(buf,tmp,sizeof buf); |
124 | } | 124 | } |
@@ -130,10 +130,10 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
130 | break; | 130 | break; |
131 | ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; | 131 | ch=((unsigned char)*(s+i*dump_width+j)) & 0xff; |
132 | #ifndef CHARSET_EBCDIC | 132 | #ifndef CHARSET_EBCDIC |
133 | BIO_snprintf(tmp,sizeof tmp,"%c", | 133 | (void) snprintf(tmp,sizeof tmp,"%c", |
134 | ((ch>=' ')&&(ch<='~'))?ch:'.'); | 134 | ((ch>=' ')&&(ch<='~'))?ch:'.'); |
135 | #else | 135 | #else |
136 | BIO_snprintf(tmp,sizeof tmp,"%c", | 136 | (void) snprintf(tmp,sizeof tmp,"%c", |
137 | ((ch>=os_toascii[' '])&&(ch<=os_toascii['~'])) | 137 | ((ch>=os_toascii[' '])&&(ch<=os_toascii['~'])) |
138 | ? os_toebcdic[ch] | 138 | ? os_toebcdic[ch] |
139 | : '.'); | 139 | : '.'); |
@@ -149,7 +149,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), | |||
149 | #ifdef TRUNCATE | 149 | #ifdef TRUNCATE |
150 | if (trc > 0) | 150 | if (trc > 0) |
151 | { | 151 | { |
152 | BIO_snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str, | 152 | (void) snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str, |
153 | len+trc); | 153 | len+trc); |
154 | ret+=cb((void *)buf,strlen(buf),u); | 154 | ret+=cb((void *)buf,strlen(buf),u); |
155 | } | 155 | } |
diff --git a/src/lib/libssl/src/crypto/bio/b_sock.c b/src/lib/libssl/src/crypto/bio/b_sock.c index 779acbaaf5..bd43307456 100644 --- a/src/lib/libssl/src/crypto/bio/b_sock.c +++ b/src/lib/libssl/src/crypto/bio/b_sock.c | |||
@@ -916,7 +916,7 @@ int BIO_accept(int sock, char **addr) | |||
916 | goto end; | 916 | goto end; |
917 | } | 917 | } |
918 | *addr = p; | 918 | *addr = p; |
919 | BIO_snprintf(*addr,nl,"%s:%s",h,s); | 919 | (void) snprintf(*addr,nl,"%s:%s",h,s); |
920 | goto end; | 920 | goto end; |
921 | } while(0); | 921 | } while(0); |
922 | #endif | 922 | #endif |
@@ -932,7 +932,7 @@ int BIO_accept(int sock, char **addr) | |||
932 | } | 932 | } |
933 | *addr=p; | 933 | *addr=p; |
934 | } | 934 | } |
935 | BIO_snprintf(*addr,24,"%d.%d.%d.%d:%d", | 935 | (void) snprintf(*addr,24,"%d.%d.%d.%d:%d", |
936 | (unsigned char)(l>>24L)&0xff, | 936 | (unsigned char)(l>>24L)&0xff, |
937 | (unsigned char)(l>>16L)&0xff, | 937 | (unsigned char)(l>>16L)&0xff, |
938 | (unsigned char)(l>> 8L)&0xff, | 938 | (unsigned char)(l>> 8L)&0xff, |
diff --git a/src/lib/libssl/src/crypto/bio/bio_cb.c b/src/lib/libssl/src/crypto/bio/bio_cb.c index 7334a254bf..78c8974ab4 100644 --- a/src/lib/libssl/src/crypto/bio/bio_cb.c +++ b/src/lib/libssl/src/crypto/bio/bio_cb.c | |||
@@ -75,60 +75,60 @@ long BIO_debug_callback(BIO *bio, int cmd, const char *argp, | |||
75 | if (BIO_CB_RETURN & cmd) | 75 | if (BIO_CB_RETURN & cmd) |
76 | r=ret; | 76 | r=ret; |
77 | 77 | ||
78 | BIO_snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio); | 78 | (void) snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio); |
79 | p= &(buf[14]); | 79 | p= &(buf[14]); |
80 | p_maxlen = sizeof buf - 14; | 80 | p_maxlen = sizeof buf - 14; |
81 | switch (cmd) | 81 | switch (cmd) |
82 | { | 82 | { |
83 | case BIO_CB_FREE: | 83 | case BIO_CB_FREE: |
84 | BIO_snprintf(p,p_maxlen,"Free - %s\n",bio->method->name); | 84 | (void) snprintf(p,p_maxlen,"Free - %s\n",bio->method->name); |
85 | break; | 85 | break; |
86 | case BIO_CB_READ: | 86 | case BIO_CB_READ: |
87 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) | 87 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) |
88 | BIO_snprintf(p,p_maxlen,"read(%d,%lu) - %s fd=%d\n", | 88 | (void) snprintf(p,p_maxlen,"read(%d,%lu) - %s fd=%d\n", |
89 | bio->num,(unsigned long)argi, | 89 | bio->num,(unsigned long)argi, |
90 | bio->method->name,bio->num); | 90 | bio->method->name,bio->num); |
91 | else | 91 | else |
92 | BIO_snprintf(p,p_maxlen,"read(%d,%lu) - %s\n", | 92 | (void) snprintf(p,p_maxlen,"read(%d,%lu) - %s\n", |
93 | bio->num,(unsigned long)argi, | 93 | bio->num,(unsigned long)argi, |
94 | bio->method->name); | 94 | bio->method->name); |
95 | break; | 95 | break; |
96 | case BIO_CB_WRITE: | 96 | case BIO_CB_WRITE: |
97 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) | 97 | if (bio->method->type & BIO_TYPE_DESCRIPTOR) |
98 | BIO_snprintf(p,p_maxlen,"write(%d,%lu) - %s fd=%d\n", | 98 | (void) snprintf(p,p_maxlen,"write(%d,%lu) - %s fd=%d\n", |
99 | bio->num,(unsigned long)argi, | 99 | bio->num,(unsigned long)argi, |
100 | bio->method->name,bio->num); | 100 | bio->method->name,bio->num); |
101 | else | 101 | else |
102 | BIO_snprintf(p,p_maxlen,"write(%d,%lu) - %s\n", | 102 | (void) snprintf(p,p_maxlen,"write(%d,%lu) - %s\n", |
103 | bio->num,(unsigned long)argi, | 103 | bio->num,(unsigned long)argi, |
104 | bio->method->name); | 104 | bio->method->name); |
105 | break; | 105 | break; |
106 | case BIO_CB_PUTS: | 106 | case BIO_CB_PUTS: |
107 | BIO_snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name); | 107 | (void) snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name); |
108 | break; | 108 | break; |
109 | case BIO_CB_GETS: | 109 | case BIO_CB_GETS: |
110 | BIO_snprintf(p,p_maxlen,"gets(%lu) - %s\n",(unsigned long)argi,bio->method->name); | 110 | (void) snprintf(p,p_maxlen,"gets(%lu) - %s\n",(unsigned long)argi,bio->method->name); |
111 | break; | 111 | break; |
112 | case BIO_CB_CTRL: | 112 | case BIO_CB_CTRL: |
113 | BIO_snprintf(p,p_maxlen,"ctrl(%lu) - %s\n",(unsigned long)argi,bio->method->name); | 113 | (void) snprintf(p,p_maxlen,"ctrl(%lu) - %s\n",(unsigned long)argi,bio->method->name); |
114 | break; | 114 | break; |
115 | case BIO_CB_RETURN|BIO_CB_READ: | 115 | case BIO_CB_RETURN|BIO_CB_READ: |
116 | BIO_snprintf(p,p_maxlen,"read return %ld\n",ret); | 116 | (void) snprintf(p,p_maxlen,"read return %ld\n",ret); |
117 | break; | 117 | break; |
118 | case BIO_CB_RETURN|BIO_CB_WRITE: | 118 | case BIO_CB_RETURN|BIO_CB_WRITE: |
119 | BIO_snprintf(p,p_maxlen,"write return %ld\n",ret); | 119 | (void) snprintf(p,p_maxlen,"write return %ld\n",ret); |
120 | break; | 120 | break; |
121 | case BIO_CB_RETURN|BIO_CB_GETS: | 121 | case BIO_CB_RETURN|BIO_CB_GETS: |
122 | BIO_snprintf(p,p_maxlen,"gets return %ld\n",ret); | 122 | (void) snprintf(p,p_maxlen,"gets return %ld\n",ret); |
123 | break; | 123 | break; |
124 | case BIO_CB_RETURN|BIO_CB_PUTS: | 124 | case BIO_CB_RETURN|BIO_CB_PUTS: |
125 | BIO_snprintf(p,p_maxlen,"puts return %ld\n",ret); | 125 | (void) snprintf(p,p_maxlen,"puts return %ld\n",ret); |
126 | break; | 126 | break; |
127 | case BIO_CB_RETURN|BIO_CB_CTRL: | 127 | case BIO_CB_RETURN|BIO_CB_CTRL: |
128 | BIO_snprintf(p,p_maxlen,"ctrl return %ld\n",ret); | 128 | (void) snprintf(p,p_maxlen,"ctrl return %ld\n",ret); |
129 | break; | 129 | break; |
130 | default: | 130 | default: |
131 | BIO_snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd); | 131 | (void) snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd); |
132 | break; | 132 | break; |
133 | } | 133 | } |
134 | 134 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bss_conn.c b/src/lib/libssl/src/crypto/bio/bss_conn.c index 42ddf1f4aa..5162e75c87 100644 --- a/src/lib/libssl/src/crypto/bio/bss_conn.c +++ b/src/lib/libssl/src/crypto/bio/bss_conn.c | |||
@@ -521,7 +521,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
521 | char buf[16]; | 521 | char buf[16]; |
522 | unsigned char *p = ptr; | 522 | unsigned char *p = ptr; |
523 | 523 | ||
524 | BIO_snprintf(buf,sizeof buf,"%d.%d.%d.%d", | 524 | (void) snprintf(buf,sizeof buf,"%d.%d.%d.%d", |
525 | p[0],p[1],p[2],p[3]); | 525 | p[0],p[1],p[2],p[3]); |
526 | if (data->param_hostname != NULL) | 526 | if (data->param_hostname != NULL) |
527 | OPENSSL_free(data->param_hostname); | 527 | OPENSSL_free(data->param_hostname); |
@@ -532,7 +532,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
532 | { | 532 | { |
533 | char buf[DECIMAL_SIZE(int)+1]; | 533 | char buf[DECIMAL_SIZE(int)+1]; |
534 | 534 | ||
535 | BIO_snprintf(buf,sizeof buf,"%d",*(int *)ptr); | 535 | (void) snprintf(buf,sizeof buf,"%d",*(int *)ptr); |
536 | if (data->param_port != NULL) | 536 | if (data->param_port != NULL) |
537 | OPENSSL_free(data->param_port); | 537 | OPENSSL_free(data->param_port); |
538 | data->param_port=BUF_strdup(buf); | 538 | data->param_port=BUF_strdup(buf); |
diff --git a/src/lib/libssl/src/crypto/bn/bn_print.c b/src/lib/libssl/src/crypto/bn/bn_print.c index 1743b6a7e2..c7c407e494 100644 --- a/src/lib/libssl/src/crypto/bn/bn_print.c +++ b/src/lib/libssl/src/crypto/bn/bn_print.c | |||
@@ -147,12 +147,12 @@ char *BN_bn2dec(const BIGNUM *a) | |||
147 | /* We now have a series of blocks, BN_DEC_NUM chars | 147 | /* We now have a series of blocks, BN_DEC_NUM chars |
148 | * in length, where the last one needs truncation. | 148 | * in length, where the last one needs truncation. |
149 | * The blocks need to be reversed in order. */ | 149 | * The blocks need to be reversed in order. */ |
150 | BIO_snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp); | 150 | (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp); |
151 | while (*p) p++; | 151 | while (*p) p++; |
152 | while (lp != bn_data) | 152 | while (lp != bn_data) |
153 | { | 153 | { |
154 | lp--; | 154 | lp--; |
155 | BIO_snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp); | 155 | (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp); |
156 | while (*p) p++; | 156 | while (*p) p++; |
157 | } | 157 | } |
158 | } | 158 | } |
@@ -367,10 +367,10 @@ char *BN_options(void) | |||
367 | { | 367 | { |
368 | init++; | 368 | init++; |
369 | #ifdef BN_LLONG | 369 | #ifdef BN_LLONG |
370 | BIO_snprintf(data,sizeof data,"bn(%d,%d)", | 370 | (void) snprintf(data,sizeof data,"bn(%d,%d)", |
371 | (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); | 371 | (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8); |
372 | #else | 372 | #else |
373 | BIO_snprintf(data,sizeof data,"bn(%d,%d)", | 373 | (void) snprintf(data,sizeof data,"bn(%d,%d)", |
374 | (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); | 374 | (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8); |
375 | #endif | 375 | #endif |
376 | } | 376 | } |
diff --git a/src/lib/libssl/src/crypto/conf/conf_def.c b/src/lib/libssl/src/crypto/conf/conf_def.c index cf951320af..15e5613e36 100644 --- a/src/lib/libssl/src/crypto/conf/conf_def.c +++ b/src/lib/libssl/src/crypto/conf/conf_def.c | |||
@@ -439,7 +439,7 @@ err: | |||
439 | if (buff != NULL) BUF_MEM_free(buff); | 439 | if (buff != NULL) BUF_MEM_free(buff); |
440 | if (section != NULL) OPENSSL_free(section); | 440 | if (section != NULL) OPENSSL_free(section); |
441 | if (line != NULL) *line=eline; | 441 | if (line != NULL) *line=eline; |
442 | BIO_snprintf(btmp,sizeof btmp,"%ld",eline); | 442 | (void) snprintf(btmp,sizeof btmp,"%ld",eline); |
443 | ERR_add_error_data(2,"line ",btmp); | 443 | ERR_add_error_data(2,"line ",btmp); |
444 | if ((h != conf->data) && (conf->data != NULL)) | 444 | if ((h != conf->data) && (conf->data != NULL)) |
445 | { | 445 | { |
diff --git a/src/lib/libssl/src/crypto/conf/conf_mod.c b/src/lib/libssl/src/crypto/conf/conf_mod.c index df1642a0a5..994294f655 100644 --- a/src/lib/libssl/src/crypto/conf/conf_mod.c +++ b/src/lib/libssl/src/crypto/conf/conf_mod.c | |||
@@ -233,7 +233,7 @@ static int module_run(const CONF *cnf, char *name, char *value, | |||
233 | { | 233 | { |
234 | char rcode[DECIMAL_SIZE(ret)+1]; | 234 | char rcode[DECIMAL_SIZE(ret)+1]; |
235 | CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR); | 235 | CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR); |
236 | BIO_snprintf(rcode, sizeof rcode, "%-8d", ret); | 236 | (void) snprintf(rcode, sizeof rcode, "%-8d", ret); |
237 | ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); | 237 | ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); |
238 | } | 238 | } |
239 | } | 239 | } |
diff --git a/src/lib/libssl/src/crypto/cversion.c b/src/lib/libssl/src/crypto/cversion.c index 1fe92a4bfa..4bbe74bd5b 100644 --- a/src/lib/libssl/src/crypto/cversion.c +++ b/src/lib/libssl/src/crypto/cversion.c | |||
@@ -71,7 +71,7 @@ const char | |||
71 | #ifdef DATE | 71 | #ifdef DATE |
72 | static char buf[sizeof(DATE) + 11]; | 72 | static char buf[sizeof(DATE) + 11]; |
73 | 73 | ||
74 | BIO_snprintf(buf, sizeof buf, "built on: %s", DATE); | 74 | (void) snprintf(buf, sizeof buf, "built on: %s", DATE); |
75 | return (buf); | 75 | return (buf); |
76 | #else | 76 | #else |
77 | return("built on: date not available"); | 77 | return("built on: date not available"); |
@@ -81,7 +81,7 @@ const char | |||
81 | #ifdef CFLAGS | 81 | #ifdef CFLAGS |
82 | static char buf[sizeof(CFLAGS) + 11]; | 82 | static char buf[sizeof(CFLAGS) + 11]; |
83 | 83 | ||
84 | BIO_snprintf(buf, sizeof buf, "compiler: %s", CFLAGS); | 84 | (void) snprintf(buf, sizeof buf, "compiler: %s", CFLAGS); |
85 | return (buf); | 85 | return (buf); |
86 | #else | 86 | #else |
87 | return("compiler: information not available"); | 87 | return("compiler: information not available"); |
@@ -91,7 +91,7 @@ const char | |||
91 | #ifdef PLATFORM | 91 | #ifdef PLATFORM |
92 | static char buf[sizeof(PLATFORM) + 11]; | 92 | static char buf[sizeof(PLATFORM) + 11]; |
93 | 93 | ||
94 | BIO_snprintf(buf, sizeof buf, "platform: %s", PLATFORM); | 94 | (void) snprintf(buf, sizeof buf, "platform: %s", PLATFORM); |
95 | return (buf); | 95 | return (buf); |
96 | #else | 96 | #else |
97 | return("platform: information not available"); | 97 | return("platform: information not available"); |
diff --git a/src/lib/libssl/src/crypto/des/ecb_enc.c b/src/lib/libssl/src/crypto/des/ecb_enc.c index 0684e769b3..b83fca71db 100644 --- a/src/lib/libssl/src/crypto/des/ecb_enc.c +++ b/src/lib/libssl/src/crypto/des/ecb_enc.c | |||
@@ -97,7 +97,7 @@ const char *DES_options(void) | |||
97 | size="int"; | 97 | size="int"; |
98 | else | 98 | else |
99 | size="long"; | 99 | size="long"; |
100 | BIO_snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll, | 100 | (void) snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll, |
101 | size); | 101 | size); |
102 | init=0; | 102 | init=0; |
103 | } | 103 | } |
diff --git a/src/lib/libssl/src/crypto/engine/eng_padlock.c b/src/lib/libssl/src/crypto/engine/eng_padlock.c index 9f7a85a8da..d1fc8d9315 100644 --- a/src/lib/libssl/src/crypto/engine/eng_padlock.c +++ b/src/lib/libssl/src/crypto/engine/eng_padlock.c | |||
@@ -178,7 +178,7 @@ padlock_bind_helper(ENGINE *e) | |||
178 | #endif | 178 | #endif |
179 | 179 | ||
180 | /* Generate a nice engine name with available features */ | 180 | /* Generate a nice engine name with available features */ |
181 | BIO_snprintf(padlock_name, sizeof(padlock_name), | 181 | (void) snprintf(padlock_name, sizeof(padlock_name), |
182 | "VIA PadLock (%s, %s)", | 182 | "VIA PadLock (%s, %s)", |
183 | padlock_use_rng ? "RNG" : "no-RNG", | 183 | padlock_use_rng ? "RNG" : "no-RNG", |
184 | padlock_use_ace ? "ACE" : "no-ACE"); | 184 | padlock_use_ace ? "ACE" : "no-ACE"); |
diff --git a/src/lib/libssl/src/crypto/err/err.c b/src/lib/libssl/src/crypto/err/err.c index 0251248baf..ae9a209ad7 100644 --- a/src/lib/libssl/src/crypto/err/err.c +++ b/src/lib/libssl/src/crypto/err/err.c | |||
@@ -872,13 +872,13 @@ void ERR_error_string_n(unsigned long e, char *buf, size_t len) | |||
872 | rs=ERR_reason_error_string(e); | 872 | rs=ERR_reason_error_string(e); |
873 | 873 | ||
874 | if (ls == NULL) | 874 | if (ls == NULL) |
875 | BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l); | 875 | (void) snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l); |
876 | if (fs == NULL) | 876 | if (fs == NULL) |
877 | BIO_snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f); | 877 | (void) snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f); |
878 | if (rs == NULL) | 878 | if (rs == NULL) |
879 | BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); | 879 | (void) snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); |
880 | 880 | ||
881 | BIO_snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, | 881 | (void) snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, |
882 | fs?fs:fsbuf, rs?rs:rsbuf); | 882 | fs?fs:fsbuf, rs?rs:rsbuf); |
883 | if (strlen(buf) == len-1) | 883 | if (strlen(buf) == len-1) |
884 | { | 884 | { |
diff --git a/src/lib/libssl/src/crypto/err/err_prn.c b/src/lib/libssl/src/crypto/err/err_prn.c index a0168ac8ed..7374c0abe7 100644 --- a/src/lib/libssl/src/crypto/err/err_prn.c +++ b/src/lib/libssl/src/crypto/err/err_prn.c | |||
@@ -79,7 +79,7 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), | |||
79 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) | 79 | while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) |
80 | { | 80 | { |
81 | ERR_error_string_n(l, buf, sizeof buf); | 81 | ERR_error_string_n(l, buf, sizeof buf); |
82 | BIO_snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf, | 82 | (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf, |
83 | file, line, (flags & ERR_TXT_STRING) ? data : ""); | 83 | file, line, (flags & ERR_TXT_STRING) ? data : ""); |
84 | if (cb(buf2, strlen(buf2), u) <= 0) | 84 | if (cb(buf2, strlen(buf2), u) <= 0) |
85 | break; /* abort outputting the error report */ | 85 | break; /* abort outputting the error report */ |
diff --git a/src/lib/libssl/src/crypto/mem_dbg.c b/src/lib/libssl/src/crypto/mem_dbg.c index 9324ec4c7d..944c3d9a61 100644 --- a/src/lib/libssl/src/crypto/mem_dbg.c +++ b/src/lib/libssl/src/crypto/mem_dbg.c | |||
@@ -665,22 +665,22 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l) | |||
665 | if (options & V_CRYPTO_MDEBUG_TIME) { | 665 | if (options & V_CRYPTO_MDEBUG_TIME) { |
666 | lcl = localtime(&m->time); | 666 | lcl = localtime(&m->time); |
667 | 667 | ||
668 | BIO_snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ", | 668 | (void) snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ", |
669 | lcl->tm_hour, lcl->tm_min, lcl->tm_sec); | 669 | lcl->tm_hour, lcl->tm_min, lcl->tm_sec); |
670 | bufp += strlen(bufp); | 670 | bufp += strlen(bufp); |
671 | } | 671 | } |
672 | 672 | ||
673 | BIO_snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ", | 673 | (void) snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ", |
674 | m->order, m->file, m->line); | 674 | m->order, m->file, m->line); |
675 | bufp += strlen(bufp); | 675 | bufp += strlen(bufp); |
676 | 676 | ||
677 | if (options & V_CRYPTO_MDEBUG_THREAD) { | 677 | if (options & V_CRYPTO_MDEBUG_THREAD) { |
678 | BIO_snprintf(bufp, BUF_REMAIN, "thread=%lu, ", | 678 | (void) snprintf(bufp, BUF_REMAIN, "thread=%lu, ", |
679 | CRYPTO_THREADID_hash(&m->threadid)); | 679 | CRYPTO_THREADID_hash(&m->threadid)); |
680 | bufp += strlen(bufp); | 680 | bufp += strlen(bufp); |
681 | } | 681 | } |
682 | 682 | ||
683 | BIO_snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n", | 683 | (void) snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n", |
684 | m->num,(unsigned long)m->addr); | 684 | m->num,(unsigned long)m->addr); |
685 | bufp += strlen(bufp); | 685 | bufp += strlen(bufp); |
686 | 686 | ||
@@ -701,7 +701,7 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l) | |||
701 | 701 | ||
702 | ami_cnt++; | 702 | ami_cnt++; |
703 | memset(buf, '>', ami_cnt); | 703 | memset(buf, '>', ami_cnt); |
704 | BIO_snprintf(buf + ami_cnt, sizeof buf - ami_cnt, | 704 | (void) snprintf(buf + ami_cnt, sizeof buf - ami_cnt, |
705 | " thread=%lu, file=%s, line=%d, info=\"", | 705 | " thread=%lu, file=%s, line=%d, info=\"", |
706 | CRYPTO_THREADID_hash(&amip->threadid), amip->file, | 706 | CRYPTO_THREADID_hash(&amip->threadid), amip->file, |
707 | amip->line); | 707 | amip->line); |
@@ -715,7 +715,7 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l) | |||
715 | sizeof buf - buf_len); | 715 | sizeof buf - buf_len); |
716 | buf_len = strlen(buf); | 716 | buf_len = strlen(buf); |
717 | } | 717 | } |
718 | BIO_snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n"); | 718 | (void) snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n"); |
719 | 719 | ||
720 | BIO_puts(l->bio, buf); | 720 | BIO_puts(l->bio, buf); |
721 | 721 | ||
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.c b/src/lib/libssl/src/crypto/objects/obj_dat.c index 99646c300c..a597284c80 100644 --- a/src/lib/libssl/src/crypto/objects/obj_dat.c +++ b/src/lib/libssl/src/crypto/objects/obj_dat.c | |||
@@ -594,7 +594,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) | |||
594 | } | 594 | } |
595 | else | 595 | else |
596 | { | 596 | { |
597 | BIO_snprintf(tbuf,sizeof tbuf,".%lu",l); | 597 | (void) snprintf(tbuf,sizeof tbuf,".%lu",l); |
598 | i=strlen(tbuf); | 598 | i=strlen(tbuf); |
599 | if (buf && (buf_len > 0)) | 599 | if (buf && (buf_len > 0)) |
600 | { | 600 | { |
diff --git a/src/lib/libssl/src/crypto/pem/pem_pkey.c b/src/lib/libssl/src/crypto/pem/pem_pkey.c index 8ecf24903b..ef152be264 100644 --- a/src/lib/libssl/src/crypto/pem/pem_pkey.c +++ b/src/lib/libssl/src/crypto/pem/pem_pkey.c | |||
@@ -147,7 +147,7 @@ int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, | |||
147 | (char *)kstr, klen, | 147 | (char *)kstr, klen, |
148 | cb, u); | 148 | cb, u); |
149 | 149 | ||
150 | BIO_snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); | 150 | (void) snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); |
151 | return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, | 151 | return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, |
152 | pem_str,bp,x,enc,kstr,klen,cb,u); | 152 | pem_str,bp,x,enc,kstr,klen,cb,u); |
153 | } | 153 | } |
@@ -199,7 +199,7 @@ int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x) | |||
199 | if (!x->ameth || !x->ameth->param_encode) | 199 | if (!x->ameth || !x->ameth->param_encode) |
200 | return 0; | 200 | return 0; |
201 | 201 | ||
202 | BIO_snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str); | 202 | (void) snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str); |
203 | return PEM_ASN1_write_bio( | 203 | return PEM_ASN1_write_bio( |
204 | (i2d_of_void *)x->ameth->param_encode, | 204 | (i2d_of_void *)x->ameth->param_encode, |
205 | pem_str,bp,x,NULL,NULL,0,0,NULL); | 205 | pem_str,bp,x,NULL,NULL,0,0,NULL); |
diff --git a/src/lib/libssl/src/crypto/ui/ui_lib.c b/src/lib/libssl/src/crypto/ui/ui_lib.c index a8abc27064..6113060aa9 100644 --- a/src/lib/libssl/src/crypto/ui/ui_lib.c +++ b/src/lib/libssl/src/crypto/ui/ui_lib.c | |||
@@ -858,9 +858,9 @@ int UI_set_result(UI *ui, UI_STRING *uis, const char *result) | |||
858 | char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize)+1]; | 858 | char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize)+1]; |
859 | char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize)+1]; | 859 | char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize)+1]; |
860 | 860 | ||
861 | BIO_snprintf(number1, sizeof(number1), "%d", | 861 | (void) snprintf(number1, sizeof(number1), "%d", |
862 | uis->_.string_data.result_minsize); | 862 | uis->_.string_data.result_minsize); |
863 | BIO_snprintf(number2, sizeof(number2), "%d", | 863 | (void) snprintf(number2, sizeof(number2), "%d", |
864 | uis->_.string_data.result_maxsize); | 864 | uis->_.string_data.result_maxsize); |
865 | 865 | ||
866 | if (l < uis->_.string_data.result_minsize) | 866 | if (l < uis->_.string_data.result_minsize) |
diff --git a/src/lib/libssl/src/crypto/x509/by_dir.c b/src/lib/libssl/src/crypto/x509/by_dir.c index c6602dae4f..f9d55c4e6d 100644 --- a/src/lib/libssl/src/crypto/x509/by_dir.c +++ b/src/lib/libssl/src/crypto/x509/by_dir.c | |||
@@ -379,13 +379,13 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, | |||
379 | { | 379 | { |
380 | /* This is special. When c == '\0', no | 380 | /* This is special. When c == '\0', no |
381 | directory separator should be added. */ | 381 | directory separator should be added. */ |
382 | BIO_snprintf(b->data,b->max, | 382 | (void) snprintf(b->data,b->max, |
383 | "%s%08lx.%s%d",ent->dir,h, | 383 | "%s%08lx.%s%d",ent->dir,h, |
384 | postfix,k); | 384 | postfix,k); |
385 | } | 385 | } |
386 | else | 386 | else |
387 | { | 387 | { |
388 | BIO_snprintf(b->data,b->max, | 388 | (void) snprintf(b->data,b->max, |
389 | "%s%c%08lx.%s%d",ent->dir,c,h, | 389 | "%s%c%08lx.%s%d",ent->dir,c,h, |
390 | postfix,k); | 390 | postfix,k); |
391 | } | 391 | } |
diff --git a/src/lib/libssl/src/crypto/x509/x509_txt.c b/src/lib/libssl/src/crypto/x509/x509_txt.c index c44f753c46..27f6c7176a 100644 --- a/src/lib/libssl/src/crypto/x509/x509_txt.c +++ b/src/lib/libssl/src/crypto/x509/x509_txt.c | |||
@@ -185,7 +185,7 @@ const char *X509_verify_cert_error_string(long n) | |||
185 | return("CRL path validation error"); | 185 | return("CRL path validation error"); |
186 | 186 | ||
187 | default: | 187 | default: |
188 | BIO_snprintf(buf,sizeof buf,"error number %ld",n); | 188 | (void) snprintf(buf,sizeof buf,"error number %ld",n); |
189 | return(buf); | 189 | return(buf); |
190 | } | 190 | } |
191 | } | 191 | } |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_alt.c b/src/lib/libssl/src/crypto/x509v3/v3_alt.c index 91aefcddc1..66ea96db51 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_alt.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_alt.c | |||
@@ -143,14 +143,14 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, | |||
143 | case GEN_IPADD: | 143 | case GEN_IPADD: |
144 | p = gen->d.ip->data; | 144 | p = gen->d.ip->data; |
145 | if(gen->d.ip->length == 4) | 145 | if(gen->d.ip->length == 4) |
146 | BIO_snprintf(oline, sizeof oline, | 146 | (void) snprintf(oline, sizeof oline, |
147 | "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); | 147 | "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); |
148 | else if(gen->d.ip->length == 16) | 148 | else if(gen->d.ip->length == 16) |
149 | { | 149 | { |
150 | oline[0] = 0; | 150 | oline[0] = 0; |
151 | for (i = 0; i < 8; i++) | 151 | for (i = 0; i < 8; i++) |
152 | { | 152 | { |
153 | BIO_snprintf(htmp, sizeof htmp, | 153 | (void) snprintf(htmp, sizeof htmp, |
154 | "%X", p[0] << 8 | p[1]); | 154 | "%X", p[0] << 8 | p[1]); |
155 | p += 2; | 155 | p += 2; |
156 | strlcat(oline, htmp, sizeof(oline)); | 156 | strlcat(oline, htmp, sizeof(oline)); |
diff --git a/src/lib/libssl/src/ssl/s3_pkt.c b/src/lib/libssl/src/ssl/s3_pkt.c index 70e6acad4f..c9a7b6cf07 100644 --- a/src/lib/libssl/src/ssl/s3_pkt.c +++ b/src/lib/libssl/src/ssl/s3_pkt.c | |||
@@ -1161,7 +1161,7 @@ start: | |||
1161 | s->rwstate = SSL_NOTHING; | 1161 | s->rwstate = SSL_NOTHING; |
1162 | s->s3->fatal_alert = alert_descr; | 1162 | s->s3->fatal_alert = alert_descr; |
1163 | SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr); | 1163 | SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr); |
1164 | BIO_snprintf(tmp, sizeof tmp, "%d", alert_descr); | 1164 | (void) snprintf(tmp, sizeof tmp, "%d", alert_descr); |
1165 | ERR_add_error_data(2, "SSL alert number ", tmp); | 1165 | ERR_add_error_data(2, "SSL alert number ", tmp); |
1166 | s->shutdown|=SSL_RECEIVED_SHUTDOWN; | 1166 | s->shutdown|=SSL_RECEIVED_SHUTDOWN; |
1167 | SSL_CTX_remove_session(s->ctx, s->session); | 1167 | SSL_CTX_remove_session(s->ctx, s->session); |