Commit 4a1f3f27 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Only declare stacks in headers



Don't define stacks in C source files: it causes warnings
about unused functions in some compilers.

Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
parent 85885715
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -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);
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;
static STACK_OF(EVP_PKEY_ASN1_METHOD) *app_methods = NULL;


#ifdef TEST
#ifdef TEST
+5 −0
Original line number Original line Diff line number Diff line
@@ -87,6 +87,11 @@ struct asn1_sctx_st {
    void *app_data;
    void *app_data;
} /* ASN1_SCTX */ ;
} /* 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 */
/* Month values for printing out times */
extern const char *_asn1_mon[12];
extern const char *_asn1_mon[12];


+4 −8
Original line number Original line Diff line number Diff line
@@ -73,20 +73,16 @@
 * from parameter values. Quotes are stripped off
 * from parameter values. Quotes are stripped off
 */
 */


typedef struct {
struct mime_param_st {
    char *param_name;           /* Param name e.g. "micalg" */
    char *param_name;           /* Param name e.g. "micalg" */
    char *param_value;          /* Param value e.g. "sha1" */
    char *param_value;          /* Param value e.g. "sha1" */
} MIME_PARAM;
};


DEFINE_STACK_OF(MIME_PARAM)
struct mime_header_st {

typedef struct {
    char *name;                 /* Name of line e.g. "content-type" */
    char *name;                 /* Name of line e.g. "content-type" */
    char *value;                /* Value of line e.g. "text/plain" */
    char *value;                /* Value of line e.g. "text/plain" */
    STACK_OF(MIME_PARAM) *params; /* Zero or more parameters */
    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,
static int asn1_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags,
                            const ASN1_ITEM *it);
                            const ASN1_ITEM *it);
+3 −0
Original line number Original line Diff line number Diff line
@@ -295,3 +295,6 @@ struct evp_Encode_Ctx_st {
    int line_num;
    int line_num;
    int expect_nl;
    int expect_nl;
};
};

typedef struct evp_pbe_st EVP_PBE_CTL;
DEFINE_STACK_OF(EVP_PBE_CTL)
+2 −3
Original line number Original line Diff line number Diff line
@@ -68,15 +68,14 @@


/* Setup a cipher context from a PBE algorithm */
/* Setup a cipher context from a PBE algorithm */


typedef struct {
struct evp_pbe_st {
    int pbe_type;
    int pbe_type;
    int pbe_nid;
    int pbe_nid;
    int cipher_nid;
    int cipher_nid;
    int md_nid;
    int md_nid;
    EVP_PBE_KEYGEN *keygen;
    EVP_PBE_KEYGEN *keygen;
} EVP_PBE_CTL;
};


DEFINE_STACK_OF(EVP_PBE_CTL)
static STACK_OF(EVP_PBE_CTL) *pbe_algs;
static STACK_OF(EVP_PBE_CTL) *pbe_algs;


static const EVP_PBE_CTL builtin_pbe[] = {
static const EVP_PBE_CTL builtin_pbe[] = {
Loading