Get rid if the annoying warning
authorRichard Levitte <levitte@openssl.org>
Thu, 27 Jan 2005 01:47:27 +0000 (01:47 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 27 Jan 2005 01:47:27 +0000 (01:47 +0000)
crypto/asn1/a_type.c
crypto/asn1/x_name.c
crypto/pem/pem_lib.c

index fe3fcd40b0b24be71bb4afdd06d7433ae3b72b24..2292d49b93f4be5d510506215709e123cb850cff 100644 (file)
@@ -71,7 +71,10 @@ int ASN1_TYPE_get(ASN1_TYPE *a)
 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value)
        {
        if (a->value.ptr != NULL)
-               ASN1_primitive_free((ASN1_VALUE **)&a, NULL);
+               {
+               ASN1_TYPE **tmp_a = &a;
+               ASN1_primitive_free((ASN1_VALUE **)tmp_a, NULL);
+               }
        a->type=type;
        a->value.ptr=value;
        }
index caece0f1585c6b63ca82a54c8026a694433f859c..31f3377b642e1b0694f54aa97e5ca01c0d624172 100644 (file)
@@ -160,21 +160,22 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, unsigned char **in, long len, cons
                                        int tag, int aclass, char opt, ASN1_TLC *ctx)
 {
        unsigned char *p = *in, *q;
-       STACK *intname = NULL;
+       STACK *intname = NULL, **intname_pp = &intname;
        int i, j, ret;
-       X509_NAME *nm = NULL;
+       X509_NAME *nm = NULL, **nm_pp = &nm;
        STACK_OF(X509_NAME_ENTRY) *entries;
        X509_NAME_ENTRY *entry;
        q = p;
 
        /* Get internal representation of Name */
-       ret = ASN1_item_ex_d2i((ASN1_VALUE **)&intname, &p, len, ASN1_ITEM_rptr(X509_NAME_INTERNAL),
-                                                               tag, aclass, opt, ctx);
+       ret = ASN1_item_ex_d2i((ASN1_VALUE **)intname_pp,
+                              &p, len, ASN1_ITEM_rptr(X509_NAME_INTERNAL),
+                              tag, aclass, opt, ctx);
        
        if(ret <= 0) return ret;
 
        if(*val) x509_name_ex_free(val, NULL);
-       if(!x509_name_ex_new((ASN1_VALUE **)&nm, NULL)) goto err;
+       if(!x509_name_ex_new((ASN1_VALUE **)nm_pp, NULL)) goto err;
        /* We've decoded it: now cache encoding */
        if(!BUF_MEM_grow(nm->bytes, p - q)) goto err;
        memcpy(nm->bytes->data, q, p - q);
@@ -218,7 +219,7 @@ static int x509_name_ex_i2d(ASN1_VALUE **val, unsigned char **out, const ASN1_IT
 
 static int x509_name_encode(X509_NAME *a)
 {
-       STACK *intname = NULL;
+       STACK *intname = NULL, **intname_pp = &intname;
        int len;
        unsigned char *p;
        STACK_OF(X509_NAME_ENTRY) *entries = NULL;
@@ -236,10 +237,12 @@ static int x509_name_encode(X509_NAME *a)
                }
                if(!sk_X509_NAME_ENTRY_push(entries, entry)) goto memerr;
        }
-       len = ASN1_item_ex_i2d((ASN1_VALUE **)&intname, NULL, ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1);
+       len = ASN1_item_ex_i2d((ASN1_VALUE **)intname_pp, NULL,
+                              ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1);
        if (!BUF_MEM_grow(a->bytes,len)) goto memerr;
        p=(unsigned char *)a->bytes->data;
-       ASN1_item_ex_i2d((ASN1_VALUE **)&intname, &p, ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1);
+       ASN1_item_ex_i2d((ASN1_VALUE **)intname_pp,
+                        &p, ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1);
        sk_pop_free(intname, sk_internal_free);
        a->modified = 0;
        return len;
index deb5b6083f085156b73fb4b02e9dd892aa7997fe..508346ef7a5511db7d51dcdc48d97ab10069d28c 100644 (file)
@@ -432,6 +432,7 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
        int o;
        const EVP_CIPHER *enc=NULL;
        char *p,c;
+       char **header_pp = &header;
 
        cipher->cipher=NULL;
        if ((header == NULL) || (*header == '\0') || (*header == '\n'))
@@ -478,7 +479,8 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
                PEMerr(PEM_F_PEM_GET_EVP_CIPHER_INFO,PEM_R_UNSUPPORTED_ENCRYPTION);
                return(0);
                }
-       if (!load_iv((unsigned char **)&header,&(cipher->iv[0]),enc->iv_len)) return(0);
+       if (!load_iv((unsigned char **)header_pp,&(cipher->iv[0]),enc->iv_len))
+               return(0);
 
        return(1);
        }