diff options
author | Rich Salz <rsalz@openssl.org> | 2016-08-30 19:31:18 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-09-22 14:36:26 +0200 |
commit | f3b3d7f0033080f86ede5a53e8af2fb313091b5a (patch) | |
tree | c3761c9e3503980b7a2933211424165adad3fa8d /crypto/x509 | |
parent | Updates CHANGES and NEWS for new release (diff) | |
download | openssl-f3b3d7f0033080f86ede5a53e8af2fb313091b5a.tar.xz openssl-f3b3d7f0033080f86ede5a53e8af2fb313091b5a.zip |
Add -Wswitch-enum
Change code so when switching on an enumeration, have case's for all
enumeration values.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_lu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index 952cbfb329..04ae1cbb30 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -132,7 +132,7 @@ static int x509_object_cmp(const X509_OBJECT *const *a, case X509_LU_CRL: ret = X509_CRL_cmp((*a)->data.crl, (*b)->data.crl); break; - default: + case X509_LU_NONE: /* abort(); */ return 0; } @@ -377,7 +377,7 @@ int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x) int X509_OBJECT_up_ref_count(X509_OBJECT *a) { switch (a->type) { - default: + case X509_LU_NONE: break; case X509_LU_X509: return X509_up_ref(a->data.x509); @@ -424,7 +424,7 @@ void X509_OBJECT_free(X509_OBJECT *a) if (a == NULL) return; switch (a->type) { - default: + case X509_LU_NONE: break; case X509_LU_X509: X509_free(a->data.x509); @@ -454,7 +454,7 @@ static int x509_object_idx_cnt(STACK_OF(X509_OBJECT) *h, X509_LOOKUP_TYPE type, stmp.data.crl = &crl_s; crl_s.crl.issuer = name; break; - default: + case X509_LU_NONE: /* abort(); */ return -1; } |