diff options
author | David Benjamin <davidben@chromium.org> | 2015-11-12 08:33:18 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-11-12 23:09:20 +0300 |
commit | 20c373118ca66ae74e7fa4c6f224e26a5619f3bd (patch) | |
tree | e62dbe4b5a32148871c4544760fb10cf32a5f27f /crypto/x509 | |
parent | 7308aaa9b47012428c282b6399ba67a0f26d0aee (diff) |
Become partially -Wmissing-variable-declarations-clean.
There's a few things that will be kind of a nuisance and possibly not worth it
(crypto/asn1 dumps a lot of undeclared things, etc.). But it caught some
mistakes. Even without the warning, making sure to include the externs before
defining a function helps catch type mismatches.
Change-Id: I3dab282aaba6023e7cebc94ed7a767a5d7446b08
Reviewed-on: https://boringssl-review.googlesource.com/6484
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/by_dir.c | 2 | ||||
-rw-r--r-- | crypto/x509/by_file.c | 2 | ||||
-rw-r--r-- | crypto/x509/x509_vfy.c | 1 | ||||
-rw-r--r-- | crypto/x509/x_name.c | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index 3393dfa4..ae50ae1e 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -98,7 +98,7 @@ static void free_dir(X509_LOOKUP *lu); static int add_cert_dir(BY_DIR *ctx,const char *dir,int type); static int get_cert_by_subject(X509_LOOKUP *xl,int type,X509_NAME *name, X509_OBJECT *ret); -X509_LOOKUP_METHOD x509_dir_lookup= +static X509_LOOKUP_METHOD x509_dir_lookup= { "Load certs from files in a directory", new_dir, /* new */ diff --git a/crypto/x509/by_file.c b/crypto/x509/by_file.c index f1d6194c..3460b570 100644 --- a/crypto/x509/by_file.c +++ b/crypto/x509/by_file.c @@ -68,7 +68,7 @@ static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret); -X509_LOOKUP_METHOD x509_file_lookup= +static X509_LOOKUP_METHOD x509_file_lookup= { "Load file into cache", NULL, /* new */ diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 695793e1..b15ebfed 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -141,7 +141,6 @@ static int check_crl_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *crl_path); static int internal_verify(X509_STORE_CTX *ctx); -const char X509_version[]="X.509"; static int null_callback(int ok, X509_STORE_CTX *e) diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c index 762756bf..a1dcd167 100644 --- a/crypto/x509/x_name.c +++ b/crypto/x509/x_name.c @@ -120,7 +120,7 @@ ASN1_ITEM_TEMPLATE_END(X509_NAME_INTERNAL) * to the external form. */ -const ASN1_EXTERN_FUNCS x509_name_ff = { +static const ASN1_EXTERN_FUNCS x509_name_ff = { NULL, x509_name_ex_new, x509_name_ex_free, |