Add support for shared libraries with OS/2.
[oweals/openssl.git] / crypto / asn1 / a_strex.c
index defc4e7ecf2076dfc5fc4fcaf136925b47312691..8dab29dca14b8c894e14372cd2d01258a2d112b0 100644 (file)
@@ -77,8 +77,8 @@
 /* Three IO functions for sending data to memory, a BIO and
  * and a FILE pointer.
  */
-
-int send_mem_chars(void *arg, const void *buf, int len)
+#if 0                          /* never used */
+static int send_mem_chars(void *arg, const void *buf, int len)
 {
        unsigned char **out = arg;
        if(!out) return 1;
@@ -86,15 +86,16 @@ int send_mem_chars(void *arg, const void *buf, int len)
        *out += len;
        return 1;
 }
+#endif
 
-int send_bio_chars(void *arg, const void *buf, int len)
+static int send_bio_chars(void *arg, const void *buf, int len)
 {
        if(!arg) return 1;
        if(BIO_write(arg, buf, len) != len) return 0;
        return 1;
 }
 
-int send_fp_chars(void *arg, const void *buf, int len)
+static int send_fp_chars(void *arg, const void *buf, int len)
 {
        if(!arg) return 1;
        if(fwrite(buf, 1, len, arg) != (unsigned int)len) return 0;
@@ -240,7 +241,7 @@ static int do_hex_dump(char_io *io_ch, void *arg, unsigned char *buf, int buflen
  * #01234 format.
  */
 
-int do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING *str)
+static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING *str)
 {
        /* Placing the ASN1_STRING in a temp ASN1_TYPE allows
         * the DER encoding to readily obtained
@@ -461,6 +462,7 @@ static int do_name_ex(char_io *io_ch, void *arg, X509_NAME *n,
                        int objlen, fld_len;
                        if((fn_opt == XN_FLAG_FN_OID) || (fn_nid==NID_undef) ) {
                                OBJ_obj2txt(objtmp, 80, fn, 1);
+                               fld_len = 0; /* XXX: what should this be? */
                                objbuf = objtmp;
                        } else {
                                if(fn_opt == XN_FLAG_FN_SN) {
@@ -469,7 +471,10 @@ static int do_name_ex(char_io *io_ch, void *arg, X509_NAME *n,
                                } else if(fn_opt == XN_FLAG_FN_LN) {
                                        fld_len = FN_WIDTH_LN;
                                        objbuf = OBJ_nid2ln(fn_nid);
-                               } else objbuf = "";
+                               } else {
+                                       fld_len = 0; /* XXX: what should this be? */
+                                       objbuf = "";
+                               }
                        }
                        objlen = strlen(objbuf);
                        if(!io_ch(arg, objbuf, objlen)) return -1;