diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-01-06 02:54:18 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-01-07 18:00:51 +0000 |
commit | 4a1f3f274108e25b97bd9870170fe2970892e155 (patch) | |
tree | 45e10bfbd19cec70d44d079d677b9852f12a501e /crypto/asn1 | |
parent | 858857157290dd35145b14044ae96be9cd8eb0df (diff) |
Only declare stacks in headers
Don't define stacks in C source files: it causes warnings
about unused functions in some compilers.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/ameth_lib.c | 1 | ||||
-rw-r--r-- | crypto/asn1/asn1_locl.h | 5 | ||||
-rw-r--r-- | crypto/asn1/asn_mime.c | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c index 1febfe91ba..a932028911 100644 --- a/crypto/asn1/ameth_lib.c +++ b/crypto/asn1/ameth_lib.c @@ -92,7 +92,6 @@ static const EVP_PKEY_ASN1_METHOD *standard_methods[] = { }; typedef int sk_cmp_fn_type(const char *const *a, const char *const *b); -DEFINE_CONST_STACK_OF(EVP_PKEY_ASN1_METHOD) static STACK_OF(EVP_PKEY_ASN1_METHOD) *app_methods = NULL; #ifdef TEST diff --git a/crypto/asn1/asn1_locl.h b/crypto/asn1/asn1_locl.h index d076fa071c..c47eb44938 100644 --- a/crypto/asn1/asn1_locl.h +++ b/crypto/asn1/asn1_locl.h @@ -87,6 +87,11 @@ struct asn1_sctx_st { void *app_data; } /* ASN1_SCTX */ ; +typedef struct mime_param_st MIME_PARAM; +DEFINE_STACK_OF(MIME_PARAM) +typedef struct mime_header_st MIME_HEADER; +DEFINE_STACK_OF(MIME_HEADER) + /* Month values for printing out times */ extern const char *_asn1_mon[12]; diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c index f138db9c81..58d53240af 100644 --- a/crypto/asn1/asn_mime.c +++ b/crypto/asn1/asn_mime.c @@ -73,20 +73,16 @@ * from parameter values. Quotes are stripped off */ -typedef struct { +struct mime_param_st { char *param_name; /* Param name e.g. "micalg" */ char *param_value; /* Param value e.g. "sha1" */ -} MIME_PARAM; +}; -DEFINE_STACK_OF(MIME_PARAM) - -typedef struct { +struct mime_header_st { char *name; /* Name of line e.g. "content-type" */ char *value; /* Value of line e.g. "text/plain" */ STACK_OF(MIME_PARAM) *params; /* Zero or more parameters */ -} MIME_HEADER; - -DEFINE_STACK_OF(MIME_HEADER) +}; static int asn1_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags, const ASN1_ITEM *it); |