Part 1 of eliminating BIO_snprintf(). This fixes mechanical conversions
authorbeck <beck@openbsd.org>
Tue, 15 Apr 2014 16:21:04 +0000 (16:21 +0000)
committerbeck <beck@openbsd.org>
Tue, 15 Apr 2014 16:21:04 +0000 (16:21 +0000)
where the return value is ignored changing to (void) snprintf.
ok deraadt@

56 files changed:
lib/libcrypto/asn1/a_gentm.c
lib/libcrypto/asn1/a_mbstr.c
lib/libcrypto/asn1/a_strex.c
lib/libcrypto/asn1/a_utctm.c
lib/libcrypto/asn1/asn1_lib.c
lib/libcrypto/asn1/asn1_par.c
lib/libcrypto/bio/b_dump.c
lib/libcrypto/bio/b_sock.c
lib/libcrypto/bio/bio_cb.c
lib/libcrypto/bio/bss_conn.c
lib/libcrypto/bn/bn_print.c
lib/libcrypto/conf/conf_def.c
lib/libcrypto/conf/conf_mod.c
lib/libcrypto/cversion.c
lib/libcrypto/des/ecb_enc.c
lib/libcrypto/engine/eng_padlock.c
lib/libcrypto/err/err.c
lib/libcrypto/err/err_prn.c
lib/libcrypto/mem_dbg.c
lib/libcrypto/objects/obj_dat.c
lib/libcrypto/pem/pem_pkey.c
lib/libcrypto/ui/ui_lib.c
lib/libcrypto/x509/by_dir.c
lib/libcrypto/x509/x509_txt.c
lib/libcrypto/x509v3/v3_alt.c
lib/libssl/s3_pkt.c
lib/libssl/src/apps/ca.c
lib/libssl/src/apps/enc.c
lib/libssl/src/apps/req.c
lib/libssl/src/apps/s_time.c
lib/libssl/src/crypto/asn1/a_gentm.c
lib/libssl/src/crypto/asn1/a_mbstr.c
lib/libssl/src/crypto/asn1/a_strex.c
lib/libssl/src/crypto/asn1/a_utctm.c
lib/libssl/src/crypto/asn1/asn1_lib.c
lib/libssl/src/crypto/asn1/asn1_par.c
lib/libssl/src/crypto/bio/b_dump.c
lib/libssl/src/crypto/bio/b_sock.c
lib/libssl/src/crypto/bio/bio_cb.c
lib/libssl/src/crypto/bio/bss_conn.c
lib/libssl/src/crypto/bn/bn_print.c
lib/libssl/src/crypto/conf/conf_def.c
lib/libssl/src/crypto/conf/conf_mod.c
lib/libssl/src/crypto/cversion.c
lib/libssl/src/crypto/des/ecb_enc.c
lib/libssl/src/crypto/engine/eng_padlock.c
lib/libssl/src/crypto/err/err.c
lib/libssl/src/crypto/err/err_prn.c
lib/libssl/src/crypto/mem_dbg.c
lib/libssl/src/crypto/objects/obj_dat.c
lib/libssl/src/crypto/pem/pem_pkey.c
lib/libssl/src/crypto/ui/ui_lib.c
lib/libssl/src/crypto/x509/by_dir.c
lib/libssl/src/crypto/x509/x509_txt.c
lib/libssl/src/crypto/x509v3/v3_alt.c
lib/libssl/src/ssl/s3_pkt.c

index c79c6f5..04266e7 100644 (file)
@@ -252,7 +252,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
                s->data=(unsigned char *)p;
                }
 
-       BIO_snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
+       (void) snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
                     ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
        s->length=strlen(p);
        s->type=V_ASN1_GENERALIZEDTIME;
index 1538e0a..264d8f6 100644 (file)
@@ -145,14 +145,14 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
 
        if((minsize > 0) && (nchar < minsize)) {
                ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT);
-               BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize);
+               (void) snprintf(strbuf, sizeof strbuf, "%ld", minsize);
                ERR_add_error_data(2, "minsize=", strbuf);
                return -1;
        }
 
        if((maxsize > 0) && (nchar > maxsize)) {
                ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG);
-               BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
+               (void) snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
                ERR_add_error_data(2, "maxsize=", strbuf);
                return -1;
        }
index ead37ac..d1a587c 100644 (file)
@@ -125,12 +125,12 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch
        if(c > 0xffffffffL)
                return -1;
        if(c > 0xffff) {
-               BIO_snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
+               (void) snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
                if(!io_ch(arg, tmphex, 10)) return -1;
                return 10;
        }
        if(c > 0xff) {
-               BIO_snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
+               (void) snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
                if(!io_ch(arg, tmphex, 6)) return -1;
                return 6;
        }
@@ -149,7 +149,7 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch
                return 2;
        }
        if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) {
-               BIO_snprintf(tmphex, 11, "\\%02X", chtmp);
+               (void) snprintf(tmphex, 11, "\\%02X", chtmp);
                if(!io_ch(arg, tmphex, 3)) return -1;
                return 3;
        }
index 072e236..615395b 100644 (file)
@@ -229,7 +229,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
                s->data=(unsigned char *)p;
                }
 
-       BIO_snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
+       (void) snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
                     ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
        s->length=strlen(p);
        s->type=V_ASN1_UTCTIME;
index 1bcb44a..4d1d6af 100644 (file)
@@ -464,8 +464,8 @@ void asn1_add_error(const unsigned char *address, int offset)
        {
        char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1];
 
-       BIO_snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address);
-       BIO_snprintf(buf2,sizeof buf2,"%d",offset);
+       (void) snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address);
+       (void) snprintf(buf2,sizeof buf2,"%d",offset);
        ERR_add_error_data(4,"address=",buf1," offset=",buf2);
        }
 
index aaca69a..29b0ba4 100644 (file)
@@ -82,13 +82,13 @@ static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed,
 
        p=str;
        if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE)
-               BIO_snprintf(str,sizeof str,"priv [ %d ] ",tag);
+               (void) snprintf(str,sizeof str,"priv [ %d ] ",tag);
        else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC)
-               BIO_snprintf(str,sizeof str,"cont [ %d ]",tag);
+               (void) snprintf(str,sizeof str,"cont [ %d ]",tag);
        else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION)
-               BIO_snprintf(str,sizeof str,"appl [ %d ]",tag);
+               (void) snprintf(str,sizeof str,"appl [ %d ]",tag);
        else if (tag > 30)
-               BIO_snprintf(str,sizeof str,"<ASN1 %d>",tag);
+               (void) snprintf(str,sizeof str,"<ASN1 %d>",tag);
        else
                p = ASN1_tag2str(tag);
 
index c80ecc4..492ee09 100644 (file)
@@ -107,7 +107,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
                {
                buf[0]='\0';    /* start with empty string */
                BUF_strlcpy(buf,str,sizeof buf);
-               BIO_snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width);
+               (void) snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width);
                BUF_strlcat(buf,tmp,sizeof buf);
                for(j=0;j<dump_width;j++)
                        {
@@ -118,7 +118,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
                        else
                                {
                                ch=((unsigned char)*(s+i*dump_width+j)) & 0xff;
-                               BIO_snprintf(tmp,sizeof tmp,"%02x%c",ch,
+                               (void) snprintf(tmp,sizeof tmp,"%02x%c",ch,
                                        j==7?'-':' ');
                                BUF_strlcat(buf,tmp,sizeof buf);
                                }
@@ -130,10 +130,10 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
                                break;
                        ch=((unsigned char)*(s+i*dump_width+j)) & 0xff;
 #ifndef CHARSET_EBCDIC
-                       BIO_snprintf(tmp,sizeof tmp,"%c",
+                       (void) snprintf(tmp,sizeof tmp,"%c",
                                ((ch>=' ')&&(ch<='~'))?ch:'.');
 #else
-                       BIO_snprintf(tmp,sizeof tmp,"%c",
+                       (void) snprintf(tmp,sizeof tmp,"%c",
                                ((ch>=os_toascii[' '])&&(ch<=os_toascii['~']))
                                ? os_toebcdic[ch]
                                : '.');
@@ -149,7 +149,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
 #ifdef TRUNCATE
        if (trc > 0)
                {
-               BIO_snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str,
+               (void) snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str,
                        len+trc);
                ret+=cb((void *)buf,strlen(buf),u);
                }
index 779acba..bd43307 100644 (file)
@@ -916,7 +916,7 @@ int BIO_accept(int sock, char **addr)
                goto end;
                }
        *addr = p;
-       BIO_snprintf(*addr,nl,"%s:%s",h,s);
+       (void) snprintf(*addr,nl,"%s:%s",h,s);
        goto end;
        } while(0);
 #endif
@@ -932,7 +932,7 @@ int BIO_accept(int sock, char **addr)
                        }
                *addr=p;
                }
-       BIO_snprintf(*addr,24,"%d.%d.%d.%d:%d",
+       (void) snprintf(*addr,24,"%d.%d.%d.%d:%d",
                     (unsigned char)(l>>24L)&0xff,
                     (unsigned char)(l>>16L)&0xff,
                     (unsigned char)(l>> 8L)&0xff,
index 7334a25..78c8974 100644 (file)
@@ -75,60 +75,60 @@ long BIO_debug_callback(BIO *bio, int cmd, const char *argp,
        if (BIO_CB_RETURN & cmd)
                r=ret;
 
-       BIO_snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio);
+       (void) snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio);
        p= &(buf[14]);
        p_maxlen = sizeof buf - 14;
        switch (cmd)
                {
        case BIO_CB_FREE:
-               BIO_snprintf(p,p_maxlen,"Free - %s\n",bio->method->name);
+               (void) snprintf(p,p_maxlen,"Free - %s\n",bio->method->name);
                break;
        case BIO_CB_READ:
                if (bio->method->type & BIO_TYPE_DESCRIPTOR)
-                       BIO_snprintf(p,p_maxlen,"read(%d,%lu) - %s fd=%d\n",
+                       (void) snprintf(p,p_maxlen,"read(%d,%lu) - %s fd=%d\n",
                                 bio->num,(unsigned long)argi,
                                 bio->method->name,bio->num);
                else
-                       BIO_snprintf(p,p_maxlen,"read(%d,%lu) - %s\n",
+                       (void) snprintf(p,p_maxlen,"read(%d,%lu) - %s\n",
                                 bio->num,(unsigned long)argi,
                                 bio->method->name);
                break;
        case BIO_CB_WRITE:
                if (bio->method->type & BIO_TYPE_DESCRIPTOR)
-                       BIO_snprintf(p,p_maxlen,"write(%d,%lu) - %s fd=%d\n",
+                       (void) snprintf(p,p_maxlen,"write(%d,%lu) - %s fd=%d\n",
                                 bio->num,(unsigned long)argi,
                                 bio->method->name,bio->num);
                else
-                       BIO_snprintf(p,p_maxlen,"write(%d,%lu) - %s\n",
+                       (void) snprintf(p,p_maxlen,"write(%d,%lu) - %s\n",
                                 bio->num,(unsigned long)argi,
                                 bio->method->name);
                break;
        case BIO_CB_PUTS:
-               BIO_snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name);
+               (void) snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name);
                break;
        case BIO_CB_GETS:
-               BIO_snprintf(p,p_maxlen,"gets(%lu) - %s\n",(unsigned long)argi,bio->method->name);
+               (void) snprintf(p,p_maxlen,"gets(%lu) - %s\n",(unsigned long)argi,bio->method->name);
                break;
        case BIO_CB_CTRL:
-               BIO_snprintf(p,p_maxlen,"ctrl(%lu) - %s\n",(unsigned long)argi,bio->method->name);
+               (void) snprintf(p,p_maxlen,"ctrl(%lu) - %s\n",(unsigned long)argi,bio->method->name);
                break;
        case BIO_CB_RETURN|BIO_CB_READ:
-               BIO_snprintf(p,p_maxlen,"read return %ld\n",ret);
+               (void) snprintf(p,p_maxlen,"read return %ld\n",ret);
                break;
        case BIO_CB_RETURN|BIO_CB_WRITE:
-               BIO_snprintf(p,p_maxlen,"write return %ld\n",ret);
+               (void) snprintf(p,p_maxlen,"write return %ld\n",ret);
                break;
        case BIO_CB_RETURN|BIO_CB_GETS:
-               BIO_snprintf(p,p_maxlen,"gets return %ld\n",ret);
+               (void) snprintf(p,p_maxlen,"gets return %ld\n",ret);
                break;
        case BIO_CB_RETURN|BIO_CB_PUTS:
-               BIO_snprintf(p,p_maxlen,"puts return %ld\n",ret);
+               (void) snprintf(p,p_maxlen,"puts return %ld\n",ret);
                break;
        case BIO_CB_RETURN|BIO_CB_CTRL:
-               BIO_snprintf(p,p_maxlen,"ctrl return %ld\n",ret);
+               (void) snprintf(p,p_maxlen,"ctrl return %ld\n",ret);
                break;
        default:
-               BIO_snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd);
+               (void) snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd);
                break;
                }
 
index 42ddf1f..5162e75 100644 (file)
@@ -521,7 +521,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
                                char buf[16];
                                unsigned char *p = ptr;
 
-                               BIO_snprintf(buf,sizeof buf,"%d.%d.%d.%d",
+                               (void) snprintf(buf,sizeof buf,"%d.%d.%d.%d",
                                             p[0],p[1],p[2],p[3]);
                                if (data->param_hostname != NULL)
                                        OPENSSL_free(data->param_hostname);
@@ -532,7 +532,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
                                {
                                char buf[DECIMAL_SIZE(int)+1];
 
-                               BIO_snprintf(buf,sizeof buf,"%d",*(int *)ptr);
+                               (void) snprintf(buf,sizeof buf,"%d",*(int *)ptr);
                                if (data->param_port != NULL)
                                        OPENSSL_free(data->param_port);
                                data->param_port=BUF_strdup(buf);
index 1743b6a..c7c407e 100644 (file)
@@ -147,12 +147,12 @@ char *BN_bn2dec(const BIGNUM *a)
                /* We now have a series of blocks, BN_DEC_NUM chars
                 * in length, where the last one needs truncation.
                 * The blocks need to be reversed in order. */
-               BIO_snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp);
+               (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp);
                while (*p) p++;
                while (lp != bn_data)
                        {
                        lp--;
-                       BIO_snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp);
+                       (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp);
                        while (*p) p++;
                        }
                }
@@ -367,10 +367,10 @@ char *BN_options(void)
                {
                init++;
 #ifdef BN_LLONG
-               BIO_snprintf(data,sizeof data,"bn(%d,%d)",
+               (void) snprintf(data,sizeof data,"bn(%d,%d)",
                             (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8);
 #else
-               BIO_snprintf(data,sizeof data,"bn(%d,%d)",
+               (void) snprintf(data,sizeof data,"bn(%d,%d)",
                             (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8);
 #endif
                }
index cf95132..15e5613 100644 (file)
@@ -439,7 +439,7 @@ err:
        if (buff != NULL) BUF_MEM_free(buff);
        if (section != NULL) OPENSSL_free(section);
        if (line != NULL) *line=eline;
-       BIO_snprintf(btmp,sizeof btmp,"%ld",eline);
+       (void) snprintf(btmp,sizeof btmp,"%ld",eline);
        ERR_add_error_data(2,"line ",btmp);
        if ((h != conf->data) && (conf->data != NULL))
                {
index df1642a..994294f 100644 (file)
@@ -233,7 +233,7 @@ static int module_run(const CONF *cnf, char *name, char *value,
                        {
                        char rcode[DECIMAL_SIZE(ret)+1];
                        CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR);
-                       BIO_snprintf(rcode, sizeof rcode, "%-8d", ret);
+                       (void) snprintf(rcode, sizeof rcode, "%-8d", ret);
                        ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
                        }
                }
index 1fe92a4..4bbe74b 100644 (file)
@@ -71,7 +71,7 @@ const char
 #ifdef DATE
                static char buf[sizeof(DATE) + 11];
 
-               BIO_snprintf(buf, sizeof buf, "built on: %s", DATE);
+               (void) snprintf(buf, sizeof buf, "built on: %s", DATE);
                return (buf);
 #else
                return("built on: date not available");
@@ -81,7 +81,7 @@ const char
 #ifdef CFLAGS
                static char buf[sizeof(CFLAGS) + 11];
 
-               BIO_snprintf(buf, sizeof buf, "compiler: %s", CFLAGS);
+               (void) snprintf(buf, sizeof buf, "compiler: %s", CFLAGS);
                return (buf);
 #else
                return("compiler: information not available");
@@ -91,7 +91,7 @@ const char
 #ifdef PLATFORM
                static char buf[sizeof(PLATFORM) + 11];
 
-               BIO_snprintf(buf, sizeof buf, "platform: %s", PLATFORM);
+               (void) snprintf(buf, sizeof buf, "platform: %s", PLATFORM);
                return (buf);
 #else
                return("platform: information not available");
index 0684e76..b83fca7 100644 (file)
@@ -97,7 +97,7 @@ const char *DES_options(void)
                        size="int";
                else
                        size="long";
-               BIO_snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
+               (void) snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
                             size);
                init=0;
                }
index 9f7a85a..d1fc8d9 100644 (file)
@@ -178,7 +178,7 @@ padlock_bind_helper(ENGINE *e)
 #endif
 
        /* Generate a nice engine name with available features */
-       BIO_snprintf(padlock_name, sizeof(padlock_name),
+       (void) snprintf(padlock_name, sizeof(padlock_name),
                "VIA PadLock (%s, %s)", 
                 padlock_use_rng ? "RNG" : "no-RNG",
                 padlock_use_ace ? "ACE" : "no-ACE");
index 0251248..ae9a209 100644 (file)
@@ -872,13 +872,13 @@ void ERR_error_string_n(unsigned long e, char *buf, size_t len)
        rs=ERR_reason_error_string(e);
 
        if (ls == NULL) 
-               BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
+               (void) snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
        if (fs == NULL)
-               BIO_snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
+               (void) snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
        if (rs == NULL)
-               BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
+               (void) snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
 
-       BIO_snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, 
+       (void) snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, 
                fs?fs:fsbuf, rs?rs:rsbuf);
        if (strlen(buf) == len-1)
                {
index a0168ac..7374c0a 100644 (file)
@@ -79,7 +79,7 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
        while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0)
                {
                ERR_error_string_n(l, buf, sizeof buf);
-               BIO_snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf,
+               (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf,
                        file, line, (flags & ERR_TXT_STRING) ? data : "");
                if (cb(buf2, strlen(buf2), u) <= 0)
                        break; /* abort outputting the error report */
index 9324ec4..944c3d9 100644 (file)
@@ -665,22 +665,22 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
        if (options & V_CRYPTO_MDEBUG_TIME) {
                lcl = localtime(&m->time);
 
-               BIO_snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ",
+               (void) snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ",
                lcl->tm_hour, lcl->tm_min, lcl->tm_sec);
                bufp += strlen(bufp);
        }
 
-       BIO_snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ",
+       (void) snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ",
        m->order, m->file, m->line);
        bufp += strlen(bufp);
 
        if (options & V_CRYPTO_MDEBUG_THREAD) {
-               BIO_snprintf(bufp, BUF_REMAIN, "thread=%lu, ",
+               (void) snprintf(bufp, BUF_REMAIN, "thread=%lu, ",
                CRYPTO_THREADID_hash(&m->threadid));
                bufp += strlen(bufp);
        }
 
-       BIO_snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n",
+       (void) snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n",
        m->num,(unsigned long)m->addr);
        bufp += strlen(bufp);
 
@@ -701,7 +701,7 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
 
                ami_cnt++;
                memset(buf, '>', ami_cnt);
-               BIO_snprintf(buf + ami_cnt, sizeof buf - ami_cnt,
+               (void) snprintf(buf + ami_cnt, sizeof buf - ami_cnt,
                " thread=%lu, file=%s, line=%d, info=\"",
                CRYPTO_THREADID_hash(&amip->threadid), amip->file,
                amip->line);
@@ -715,7 +715,7 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
                        sizeof buf - buf_len);
                        buf_len = strlen(buf);
                }
-               BIO_snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n");
+               (void) snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n");
 
                BIO_puts(l->bio, buf);
 
index 99646c3..a597284 100644 (file)
@@ -594,7 +594,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
                        }
                else
                        {
-                       BIO_snprintf(tbuf,sizeof tbuf,".%lu",l);
+                       (void) snprintf(tbuf,sizeof tbuf,".%lu",l);
                        i=strlen(tbuf);
                        if (buf && (buf_len > 0))
                                {
index 8ecf249..ef152be 100644 (file)
@@ -147,7 +147,7 @@ int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
                                                        (char *)kstr, klen,
                                                        cb, u);
 
-       BIO_snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str);
+       (void) snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str);
        return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey,
                                pem_str,bp,x,enc,kstr,klen,cb,u);
        }
@@ -199,7 +199,7 @@ int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x)
        if (!x->ameth || !x->ameth->param_encode)
                return 0;
 
-       BIO_snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str);
+       (void) snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str);
        return PEM_ASN1_write_bio(
                (i2d_of_void *)x->ameth->param_encode,
                                pem_str,bp,x,NULL,NULL,0,0,NULL);
index a8abc27..6113060 100644 (file)
@@ -858,9 +858,9 @@ int UI_set_result(UI *ui, UI_STRING *uis, const char *result)
                char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize)+1];
                char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize)+1];
 
-               BIO_snprintf(number1, sizeof(number1), "%d",
+               (void) snprintf(number1, sizeof(number1), "%d",
                        uis->_.string_data.result_minsize);
-               BIO_snprintf(number2, sizeof(number2), "%d",
+               (void) snprintf(number2, sizeof(number2), "%d",
                        uis->_.string_data.result_maxsize);
 
                if (l < uis->_.string_data.result_minsize)
index c6602da..f9d55c4 100644 (file)
@@ -379,13 +379,13 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
                                {
                                /* This is special.  When c == '\0', no
                                   directory separator should be added. */
-                               BIO_snprintf(b->data,b->max,
+                               (void) snprintf(b->data,b->max,
                                        "%s%08lx.%s%d",ent->dir,h,
                                        postfix,k);
                                }
                        else
                                {
-                               BIO_snprintf(b->data,b->max,
+                               (void) snprintf(b->data,b->max,
                                        "%s%c%08lx.%s%d",ent->dir,c,h,
                                        postfix,k);
                                }
index c44f753..27f6c71 100644 (file)
@@ -185,7 +185,7 @@ const char *X509_verify_cert_error_string(long n)
                return("CRL path validation error");
 
        default:
-               BIO_snprintf(buf,sizeof buf,"error number %ld",n);
+               (void) snprintf(buf,sizeof buf,"error number %ld",n);
                return(buf);
                }
        }
index 91aefcd..66ea96d 100644 (file)
@@ -143,14 +143,14 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
                case GEN_IPADD:
                p = gen->d.ip->data;
                if(gen->d.ip->length == 4)
-                       BIO_snprintf(oline, sizeof oline,
+                       (void) snprintf(oline, sizeof oline,
                                     "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
                else if(gen->d.ip->length == 16)
                        {
                        oline[0] = 0;
                        for (i = 0; i < 8; i++)
                                {
-                               BIO_snprintf(htmp, sizeof htmp,
+                               (void) snprintf(htmp, sizeof htmp,
                                             "%X", p[0] << 8 | p[1]);
                                p += 2;
                                strlcat(oline, htmp, sizeof(oline));
index 70e6aca..c9a7b6c 100644 (file)
@@ -1161,7 +1161,7 @@ start:
                        s->rwstate = SSL_NOTHING;
                        s->s3->fatal_alert = alert_descr;
                        SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr);
-                       BIO_snprintf(tmp, sizeof tmp, "%d", alert_descr);
+                       (void) snprintf(tmp, sizeof tmp, "%d", alert_descr);
                        ERR_add_error_data(2, "SSL alert number ", tmp);
                        s->shutdown|=SSL_RECEIVED_SHUTDOWN;
                        SSL_CTX_remove_session(s->ctx, s->session);
index b07cf97..6f37e02 100644 (file)
@@ -1330,7 +1330,7 @@ bad:
                                        {
                                        if (n >= &(buf[2][sizeof(buf[2])]))
                                                break;
-                                       BIO_snprintf(n,
+                                       (void) snprintf(n,
                                                     &buf[2][0] + sizeof(buf[2]) - n,
                                                     "%02X",(unsigned char)*(p++));
                                        n+=2;
index 719acc3..ab97489 100644 (file)
@@ -425,7 +425,7 @@ bad:
                        {
                        char buf[200];
 
-                       BIO_snprintf(buf,sizeof buf,"enter %s %s password:",
+                       (void) snprintf(buf,sizeof buf,"enter %s %s password:",
                                     OBJ_nid2ln(EVP_CIPHER_nid(cipher)),
                                     (enc)?"encryption":"decryption");
                        strbuf[0]='\0';
index 8e2cc4d..f1f4128 100644 (file)
@@ -1271,21 +1271,21 @@ start:          for (;;)
                                def="";
                                }
                                
-                       BIO_snprintf(buf,sizeof buf,"%s_value",v->name);
+                       (void) snprintf(buf,sizeof buf,"%s_value",v->name);
                        if ((value=NCONF_get_string(req_conf,dn_sect,buf)) == NULL)
                                {
                                ERR_clear_error();
                                value=NULL;
                                }
 
-                       BIO_snprintf(buf,sizeof buf,"%s_min",v->name);
+                       (void) snprintf(buf,sizeof buf,"%s_min",v->name);
                        if (!NCONF_get_number(req_conf,dn_sect,buf, &n_min))
                                {
                                ERR_clear_error();
                                n_min = -1;
                                }
 
-                       BIO_snprintf(buf,sizeof buf,"%s_max",v->name);
+                       (void) snprintf(buf,sizeof buf,"%s_max",v->name);
                        if (!NCONF_get_number(req_conf,dn_sect,buf, &n_max))
                                {
                                ERR_clear_error();
@@ -1338,7 +1338,7 @@ start2:                   for (;;)
                                        }
                                
                                
-                               BIO_snprintf(buf,sizeof buf,"%s_value",type);
+                               (void) snprintf(buf,sizeof buf,"%s_value",type);
                                if ((value=NCONF_get_string(req_conf,attr_sect,buf))
                                        == NULL)
                                        {
index 8a5e076..cda06bb 100644 (file)
@@ -410,7 +410,7 @@ int MAIN(int argc, char **argv)
 
                if (s_www_path != NULL)
                        {
-                       BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
+                       (void) snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
                        SSL_write(scon,buf,strlen(buf));
                        while ((i=SSL_read(scon,buf,sizeof(buf))) > 0)
                                bytes_read+=i;
@@ -466,7 +466,7 @@ next:
 
        if (s_www_path != NULL)
                {
-               BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
+               (void) snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
                SSL_write(scon,buf,strlen(buf));
                while (SSL_read(scon,buf,sizeof(buf)) > 0)
                        ;
@@ -505,7 +505,7 @@ next:
 
                if (s_www_path)
                        {
-                       BIO_snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
+                       (void) snprintf(buf,sizeof buf,"GET %s HTTP/1.0\r\n\r\n",s_www_path);
                        SSL_write(scon,buf,strlen(buf));
                        while ((i=SSL_read(scon,buf,sizeof(buf))) > 0)
                                bytes_read+=i;
index c79c6f5..04266e7 100644 (file)
@@ -252,7 +252,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
                s->data=(unsigned char *)p;
                }
 
-       BIO_snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
+       (void) snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
                     ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
        s->length=strlen(p);
        s->type=V_ASN1_GENERALIZEDTIME;
index 1538e0a..264d8f6 100644 (file)
@@ -145,14 +145,14 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
 
        if((minsize > 0) && (nchar < minsize)) {
                ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT);
-               BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize);
+               (void) snprintf(strbuf, sizeof strbuf, "%ld", minsize);
                ERR_add_error_data(2, "minsize=", strbuf);
                return -1;
        }
 
        if((maxsize > 0) && (nchar > maxsize)) {
                ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG);
-               BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
+               (void) snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
                ERR_add_error_data(2, "maxsize=", strbuf);
                return -1;
        }
index ead37ac..d1a587c 100644 (file)
@@ -125,12 +125,12 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch
        if(c > 0xffffffffL)
                return -1;
        if(c > 0xffff) {
-               BIO_snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
+               (void) snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
                if(!io_ch(arg, tmphex, 10)) return -1;
                return 10;
        }
        if(c > 0xff) {
-               BIO_snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
+               (void) snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
                if(!io_ch(arg, tmphex, 6)) return -1;
                return 6;
        }
@@ -149,7 +149,7 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch
                return 2;
        }
        if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) {
-               BIO_snprintf(tmphex, 11, "\\%02X", chtmp);
+               (void) snprintf(tmphex, 11, "\\%02X", chtmp);
                if(!io_ch(arg, tmphex, 3)) return -1;
                return 3;
        }
index 072e236..615395b 100644 (file)
@@ -229,7 +229,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
                s->data=(unsigned char *)p;
                }
 
-       BIO_snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
+       (void) snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
                     ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
        s->length=strlen(p);
        s->type=V_ASN1_UTCTIME;
index 1bcb44a..4d1d6af 100644 (file)
@@ -464,8 +464,8 @@ void asn1_add_error(const unsigned char *address, int offset)
        {
        char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1];
 
-       BIO_snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address);
-       BIO_snprintf(buf2,sizeof buf2,"%d",offset);
+       (void) snprintf(buf1,sizeof buf1,"%lu",(unsigned long)address);
+       (void) snprintf(buf2,sizeof buf2,"%d",offset);
        ERR_add_error_data(4,"address=",buf1," offset=",buf2);
        }
 
index aaca69a..29b0ba4 100644 (file)
@@ -82,13 +82,13 @@ static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed,
 
        p=str;
        if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE)
-               BIO_snprintf(str,sizeof str,"priv [ %d ] ",tag);
+               (void) snprintf(str,sizeof str,"priv [ %d ] ",tag);
        else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC)
-               BIO_snprintf(str,sizeof str,"cont [ %d ]",tag);
+               (void) snprintf(str,sizeof str,"cont [ %d ]",tag);
        else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION)
-               BIO_snprintf(str,sizeof str,"appl [ %d ]",tag);
+               (void) snprintf(str,sizeof str,"appl [ %d ]",tag);
        else if (tag > 30)
-               BIO_snprintf(str,sizeof str,"<ASN1 %d>",tag);
+               (void) snprintf(str,sizeof str,"<ASN1 %d>",tag);
        else
                p = ASN1_tag2str(tag);
 
index c80ecc4..492ee09 100644 (file)
@@ -107,7 +107,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
                {
                buf[0]='\0';    /* start with empty string */
                BUF_strlcpy(buf,str,sizeof buf);
-               BIO_snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width);
+               (void) snprintf(tmp,sizeof tmp,"%04x - ",i*dump_width);
                BUF_strlcat(buf,tmp,sizeof buf);
                for(j=0;j<dump_width;j++)
                        {
@@ -118,7 +118,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
                        else
                                {
                                ch=((unsigned char)*(s+i*dump_width+j)) & 0xff;
-                               BIO_snprintf(tmp,sizeof tmp,"%02x%c",ch,
+                               (void) snprintf(tmp,sizeof tmp,"%02x%c",ch,
                                        j==7?'-':' ');
                                BUF_strlcat(buf,tmp,sizeof buf);
                                }
@@ -130,10 +130,10 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
                                break;
                        ch=((unsigned char)*(s+i*dump_width+j)) & 0xff;
 #ifndef CHARSET_EBCDIC
-                       BIO_snprintf(tmp,sizeof tmp,"%c",
+                       (void) snprintf(tmp,sizeof tmp,"%c",
                                ((ch>=' ')&&(ch<='~'))?ch:'.');
 #else
-                       BIO_snprintf(tmp,sizeof tmp,"%c",
+                       (void) snprintf(tmp,sizeof tmp,"%c",
                                ((ch>=os_toascii[' '])&&(ch<=os_toascii['~']))
                                ? os_toebcdic[ch]
                                : '.');
@@ -149,7 +149,7 @@ int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
 #ifdef TRUNCATE
        if (trc > 0)
                {
-               BIO_snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str,
+               (void) snprintf(buf,sizeof buf,"%s%04x - <SPACES/NULS>\n",str,
                        len+trc);
                ret+=cb((void *)buf,strlen(buf),u);
                }
index 779acba..bd43307 100644 (file)
@@ -916,7 +916,7 @@ int BIO_accept(int sock, char **addr)
                goto end;
                }
        *addr = p;
-       BIO_snprintf(*addr,nl,"%s:%s",h,s);
+       (void) snprintf(*addr,nl,"%s:%s",h,s);
        goto end;
        } while(0);
 #endif
@@ -932,7 +932,7 @@ int BIO_accept(int sock, char **addr)
                        }
                *addr=p;
                }
-       BIO_snprintf(*addr,24,"%d.%d.%d.%d:%d",
+       (void) snprintf(*addr,24,"%d.%d.%d.%d:%d",
                     (unsigned char)(l>>24L)&0xff,
                     (unsigned char)(l>>16L)&0xff,
                     (unsigned char)(l>> 8L)&0xff,
index 7334a25..78c8974 100644 (file)
@@ -75,60 +75,60 @@ long BIO_debug_callback(BIO *bio, int cmd, const char *argp,
        if (BIO_CB_RETURN & cmd)
                r=ret;
 
-       BIO_snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio);
+       (void) snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio);
        p= &(buf[14]);
        p_maxlen = sizeof buf - 14;
        switch (cmd)
                {
        case BIO_CB_FREE:
-               BIO_snprintf(p,p_maxlen,"Free - %s\n",bio->method->name);
+               (void) snprintf(p,p_maxlen,"Free - %s\n",bio->method->name);
                break;
        case BIO_CB_READ:
                if (bio->method->type & BIO_TYPE_DESCRIPTOR)
-                       BIO_snprintf(p,p_maxlen,"read(%d,%lu) - %s fd=%d\n",
+                       (void) snprintf(p,p_maxlen,"read(%d,%lu) - %s fd=%d\n",
                                 bio->num,(unsigned long)argi,
                                 bio->method->name,bio->num);
                else
-                       BIO_snprintf(p,p_maxlen,"read(%d,%lu) - %s\n",
+                       (void) snprintf(p,p_maxlen,"read(%d,%lu) - %s\n",
                                 bio->num,(unsigned long)argi,
                                 bio->method->name);
                break;
        case BIO_CB_WRITE:
                if (bio->method->type & BIO_TYPE_DESCRIPTOR)
-                       BIO_snprintf(p,p_maxlen,"write(%d,%lu) - %s fd=%d\n",
+                       (void) snprintf(p,p_maxlen,"write(%d,%lu) - %s fd=%d\n",
                                 bio->num,(unsigned long)argi,
                                 bio->method->name,bio->num);
                else
-                       BIO_snprintf(p,p_maxlen,"write(%d,%lu) - %s\n",
+                       (void) snprintf(p,p_maxlen,"write(%d,%lu) - %s\n",
                                 bio->num,(unsigned long)argi,
                                 bio->method->name);
                break;
        case BIO_CB_PUTS:
-               BIO_snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name);
+               (void) snprintf(p,p_maxlen,"puts() - %s\n",bio->method->name);
                break;
        case BIO_CB_GETS:
-               BIO_snprintf(p,p_maxlen,"gets(%lu) - %s\n",(unsigned long)argi,bio->method->name);
+               (void) snprintf(p,p_maxlen,"gets(%lu) - %s\n",(unsigned long)argi,bio->method->name);
                break;
        case BIO_CB_CTRL:
-               BIO_snprintf(p,p_maxlen,"ctrl(%lu) - %s\n",(unsigned long)argi,bio->method->name);
+               (void) snprintf(p,p_maxlen,"ctrl(%lu) - %s\n",(unsigned long)argi,bio->method->name);
                break;
        case BIO_CB_RETURN|BIO_CB_READ:
-               BIO_snprintf(p,p_maxlen,"read return %ld\n",ret);
+               (void) snprintf(p,p_maxlen,"read return %ld\n",ret);
                break;
        case BIO_CB_RETURN|BIO_CB_WRITE:
-               BIO_snprintf(p,p_maxlen,"write return %ld\n",ret);
+               (void) snprintf(p,p_maxlen,"write return %ld\n",ret);
                break;
        case BIO_CB_RETURN|BIO_CB_GETS:
-               BIO_snprintf(p,p_maxlen,"gets return %ld\n",ret);
+               (void) snprintf(p,p_maxlen,"gets return %ld\n",ret);
                break;
        case BIO_CB_RETURN|BIO_CB_PUTS:
-               BIO_snprintf(p,p_maxlen,"puts return %ld\n",ret);
+               (void) snprintf(p,p_maxlen,"puts return %ld\n",ret);
                break;
        case BIO_CB_RETURN|BIO_CB_CTRL:
-               BIO_snprintf(p,p_maxlen,"ctrl return %ld\n",ret);
+               (void) snprintf(p,p_maxlen,"ctrl return %ld\n",ret);
                break;
        default:
-               BIO_snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd);
+               (void) snprintf(p,p_maxlen,"bio callback - unknown type (%d)\n",cmd);
                break;
                }
 
index 42ddf1f..5162e75 100644 (file)
@@ -521,7 +521,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
                                char buf[16];
                                unsigned char *p = ptr;
 
-                               BIO_snprintf(buf,sizeof buf,"%d.%d.%d.%d",
+                               (void) snprintf(buf,sizeof buf,"%d.%d.%d.%d",
                                             p[0],p[1],p[2],p[3]);
                                if (data->param_hostname != NULL)
                                        OPENSSL_free(data->param_hostname);
@@ -532,7 +532,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
                                {
                                char buf[DECIMAL_SIZE(int)+1];
 
-                               BIO_snprintf(buf,sizeof buf,"%d",*(int *)ptr);
+                               (void) snprintf(buf,sizeof buf,"%d",*(int *)ptr);
                                if (data->param_port != NULL)
                                        OPENSSL_free(data->param_port);
                                data->param_port=BUF_strdup(buf);
index 1743b6a..c7c407e 100644 (file)
@@ -147,12 +147,12 @@ char *BN_bn2dec(const BIGNUM *a)
                /* We now have a series of blocks, BN_DEC_NUM chars
                 * in length, where the last one needs truncation.
                 * The blocks need to be reversed in order. */
-               BIO_snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp);
+               (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp);
                while (*p) p++;
                while (lp != bn_data)
                        {
                        lp--;
-                       BIO_snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp);
+                       (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp);
                        while (*p) p++;
                        }
                }
@@ -367,10 +367,10 @@ char *BN_options(void)
                {
                init++;
 #ifdef BN_LLONG
-               BIO_snprintf(data,sizeof data,"bn(%d,%d)",
+               (void) snprintf(data,sizeof data,"bn(%d,%d)",
                             (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8);
 #else
-               BIO_snprintf(data,sizeof data,"bn(%d,%d)",
+               (void) snprintf(data,sizeof data,"bn(%d,%d)",
                             (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8);
 #endif
                }
index cf95132..15e5613 100644 (file)
@@ -439,7 +439,7 @@ err:
        if (buff != NULL) BUF_MEM_free(buff);
        if (section != NULL) OPENSSL_free(section);
        if (line != NULL) *line=eline;
-       BIO_snprintf(btmp,sizeof btmp,"%ld",eline);
+       (void) snprintf(btmp,sizeof btmp,"%ld",eline);
        ERR_add_error_data(2,"line ",btmp);
        if ((h != conf->data) && (conf->data != NULL))
                {
index df1642a..994294f 100644 (file)
@@ -233,7 +233,7 @@ static int module_run(const CONF *cnf, char *name, char *value,
                        {
                        char rcode[DECIMAL_SIZE(ret)+1];
                        CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR);
-                       BIO_snprintf(rcode, sizeof rcode, "%-8d", ret);
+                       (void) snprintf(rcode, sizeof rcode, "%-8d", ret);
                        ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
                        }
                }
index 1fe92a4..4bbe74b 100644 (file)
@@ -71,7 +71,7 @@ const char
 #ifdef DATE
                static char buf[sizeof(DATE) + 11];
 
-               BIO_snprintf(buf, sizeof buf, "built on: %s", DATE);
+               (void) snprintf(buf, sizeof buf, "built on: %s", DATE);
                return (buf);
 #else
                return("built on: date not available");
@@ -81,7 +81,7 @@ const char
 #ifdef CFLAGS
                static char buf[sizeof(CFLAGS) + 11];
 
-               BIO_snprintf(buf, sizeof buf, "compiler: %s", CFLAGS);
+               (void) snprintf(buf, sizeof buf, "compiler: %s", CFLAGS);
                return (buf);
 #else
                return("compiler: information not available");
@@ -91,7 +91,7 @@ const char
 #ifdef PLATFORM
                static char buf[sizeof(PLATFORM) + 11];
 
-               BIO_snprintf(buf, sizeof buf, "platform: %s", PLATFORM);
+               (void) snprintf(buf, sizeof buf, "platform: %s", PLATFORM);
                return (buf);
 #else
                return("platform: information not available");
index 0684e76..b83fca7 100644 (file)
@@ -97,7 +97,7 @@ const char *DES_options(void)
                        size="int";
                else
                        size="long";
-               BIO_snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
+               (void) snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
                             size);
                init=0;
                }
index 9f7a85a..d1fc8d9 100644 (file)
@@ -178,7 +178,7 @@ padlock_bind_helper(ENGINE *e)
 #endif
 
        /* Generate a nice engine name with available features */
-       BIO_snprintf(padlock_name, sizeof(padlock_name),
+       (void) snprintf(padlock_name, sizeof(padlock_name),
                "VIA PadLock (%s, %s)", 
                 padlock_use_rng ? "RNG" : "no-RNG",
                 padlock_use_ace ? "ACE" : "no-ACE");
index 0251248..ae9a209 100644 (file)
@@ -872,13 +872,13 @@ void ERR_error_string_n(unsigned long e, char *buf, size_t len)
        rs=ERR_reason_error_string(e);
 
        if (ls == NULL) 
-               BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
+               (void) snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
        if (fs == NULL)
-               BIO_snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
+               (void) snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
        if (rs == NULL)
-               BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
+               (void) snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
 
-       BIO_snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, 
+       (void) snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf, 
                fs?fs:fsbuf, rs?rs:rsbuf);
        if (strlen(buf) == len-1)
                {
index a0168ac..7374c0a 100644 (file)
@@ -79,7 +79,7 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
        while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0)
                {
                ERR_error_string_n(l, buf, sizeof buf);
-               BIO_snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf,
+               (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf,
                        file, line, (flags & ERR_TXT_STRING) ? data : "");
                if (cb(buf2, strlen(buf2), u) <= 0)
                        break; /* abort outputting the error report */
index 9324ec4..944c3d9 100644 (file)
@@ -665,22 +665,22 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
        if (options & V_CRYPTO_MDEBUG_TIME) {
                lcl = localtime(&m->time);
 
-               BIO_snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ",
+               (void) snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ",
                lcl->tm_hour, lcl->tm_min, lcl->tm_sec);
                bufp += strlen(bufp);
        }
 
-       BIO_snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ",
+       (void) snprintf(bufp, BUF_REMAIN, "%5lu file=%s, line=%d, ",
        m->order, m->file, m->line);
        bufp += strlen(bufp);
 
        if (options & V_CRYPTO_MDEBUG_THREAD) {
-               BIO_snprintf(bufp, BUF_REMAIN, "thread=%lu, ",
+               (void) snprintf(bufp, BUF_REMAIN, "thread=%lu, ",
                CRYPTO_THREADID_hash(&m->threadid));
                bufp += strlen(bufp);
        }
 
-       BIO_snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n",
+       (void) snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n",
        m->num,(unsigned long)m->addr);
        bufp += strlen(bufp);
 
@@ -701,7 +701,7 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
 
                ami_cnt++;
                memset(buf, '>', ami_cnt);
-               BIO_snprintf(buf + ami_cnt, sizeof buf - ami_cnt,
+               (void) snprintf(buf + ami_cnt, sizeof buf - ami_cnt,
                " thread=%lu, file=%s, line=%d, info=\"",
                CRYPTO_THREADID_hash(&amip->threadid), amip->file,
                amip->line);
@@ -715,7 +715,7 @@ print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
                        sizeof buf - buf_len);
                        buf_len = strlen(buf);
                }
-               BIO_snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n");
+               (void) snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n");
 
                BIO_puts(l->bio, buf);
 
index 99646c3..a597284 100644 (file)
@@ -594,7 +594,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
                        }
                else
                        {
-                       BIO_snprintf(tbuf,sizeof tbuf,".%lu",l);
+                       (void) snprintf(tbuf,sizeof tbuf,".%lu",l);
                        i=strlen(tbuf);
                        if (buf && (buf_len > 0))
                                {
index 8ecf249..ef152be 100644 (file)
@@ -147,7 +147,7 @@ int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
                                                        (char *)kstr, klen,
                                                        cb, u);
 
-       BIO_snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str);
+       (void) snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str);
        return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey,
                                pem_str,bp,x,enc,kstr,klen,cb,u);
        }
@@ -199,7 +199,7 @@ int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x)
        if (!x->ameth || !x->ameth->param_encode)
                return 0;
 
-       BIO_snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str);
+       (void) snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str);
        return PEM_ASN1_write_bio(
                (i2d_of_void *)x->ameth->param_encode,
                                pem_str,bp,x,NULL,NULL,0,0,NULL);
index a8abc27..6113060 100644 (file)
@@ -858,9 +858,9 @@ int UI_set_result(UI *ui, UI_STRING *uis, const char *result)
                char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize)+1];
                char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize)+1];
 
-               BIO_snprintf(number1, sizeof(number1), "%d",
+               (void) snprintf(number1, sizeof(number1), "%d",
                        uis->_.string_data.result_minsize);
-               BIO_snprintf(number2, sizeof(number2), "%d",
+               (void) snprintf(number2, sizeof(number2), "%d",
                        uis->_.string_data.result_maxsize);
 
                if (l < uis->_.string_data.result_minsize)
index c6602da..f9d55c4 100644 (file)
@@ -379,13 +379,13 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
                                {
                                /* This is special.  When c == '\0', no
                                   directory separator should be added. */
-                               BIO_snprintf(b->data,b->max,
+                               (void) snprintf(b->data,b->max,
                                        "%s%08lx.%s%d",ent->dir,h,
                                        postfix,k);
                                }
                        else
                                {
-                               BIO_snprintf(b->data,b->max,
+                               (void) snprintf(b->data,b->max,
                                        "%s%c%08lx.%s%d",ent->dir,c,h,
                                        postfix,k);
                                }
index c44f753..27f6c71 100644 (file)
@@ -185,7 +185,7 @@ const char *X509_verify_cert_error_string(long n)
                return("CRL path validation error");
 
        default:
-               BIO_snprintf(buf,sizeof buf,"error number %ld",n);
+               (void) snprintf(buf,sizeof buf,"error number %ld",n);
                return(buf);
                }
        }
index 91aefcd..66ea96d 100644 (file)
@@ -143,14 +143,14 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
                case GEN_IPADD:
                p = gen->d.ip->data;
                if(gen->d.ip->length == 4)
-                       BIO_snprintf(oline, sizeof oline,
+                       (void) snprintf(oline, sizeof oline,
                                     "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
                else if(gen->d.ip->length == 16)
                        {
                        oline[0] = 0;
                        for (i = 0; i < 8; i++)
                                {
-                               BIO_snprintf(htmp, sizeof htmp,
+                               (void) snprintf(htmp, sizeof htmp,
                                             "%X", p[0] << 8 | p[1]);
                                p += 2;
                                strlcat(oline, htmp, sizeof(oline));
index 70e6aca..c9a7b6c 100644 (file)
@@ -1161,7 +1161,7 @@ start:
                        s->rwstate = SSL_NOTHING;
                        s->s3->fatal_alert = alert_descr;
                        SSLerr(SSL_F_SSL3_READ_BYTES, SSL_AD_REASON_OFFSET + alert_descr);
-                       BIO_snprintf(tmp, sizeof tmp, "%d", alert_descr);
+                       (void) snprintf(tmp, sizeof tmp, "%d", alert_descr);
                        ERR_add_error_data(2, "SSL alert number ", tmp);
                        s->shutdown|=SSL_RECEIVED_SHUTDOWN;
                        SSL_CTX_remove_session(s->ctx, s->session);