diff options
author | Richard Levitte <levitte@openssl.org> | 2015-01-29 01:54:09 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-01-29 01:54:09 +0100 |
commit | c6ef15c494e49ecc505156c8063474b20e29ef6a (patch) | |
tree | accf01dca71f3c74a0c60aa879645cae8d99c2e4 /crypto | |
parent | 7317192c645f24dfdb0c8340b871bc045454f8f4 (diff) |
clang on Linux x86_64 complains about unreachable code.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/asn1_gen.c | 2 | ||||
-rw-r--r-- | crypto/asn1/asn_mime.c | 1 | ||||
-rw-r--r-- | crypto/asn1/bio_asn1.c | 1 | ||||
-rw-r--r-- | crypto/asn1/tasn_dec.c | 1 | ||||
-rw-r--r-- | crypto/asn1/tasn_enc.c | 3 | ||||
-rw-r--r-- | crypto/bf/bftest.c | 1 | ||||
-rw-r--r-- | crypto/bio/bss_dgram.c | 1 | ||||
-rw-r--r-- | crypto/bn/bntest.c | 1 | ||||
-rw-r--r-- | crypto/bn/exptest.c | 1 | ||||
-rw-r--r-- | crypto/cast/casttest.c | 1 | ||||
-rw-r--r-- | crypto/cms/cms_env.c | 2 | ||||
-rw-r--r-- | crypto/dh/dhtest.c | 1 | ||||
-rw-r--r-- | crypto/dsa/dsatest.c | 1 | ||||
-rw-r--r-- | crypto/ecdh/ecdhtest.c | 1 | ||||
-rw-r--r-- | crypto/evp/evp_enc.c | 1 | ||||
-rw-r--r-- | crypto/evp/evp_pkey.c | 2 | ||||
-rw-r--r-- | crypto/evp/evp_test.c | 1 | ||||
-rw-r--r-- | crypto/hmac/hmactest.c | 1 | ||||
-rw-r--r-- | crypto/idea/ideatest.c | 1 | ||||
-rw-r--r-- | crypto/md4/md4test.c | 1 | ||||
-rw-r--r-- | crypto/md5/md5test.c | 1 | ||||
-rw-r--r-- | crypto/mdc2/mdc2test.c | 1 | ||||
-rw-r--r-- | crypto/ocsp/ocsp_ht.c | 2 | ||||
-rw-r--r-- | crypto/pkcs12/p12_kiss.c | 2 | ||||
-rw-r--r-- | crypto/rand/randtest.c | 1 | ||||
-rw-r--r-- | crypto/rc2/rc2test.c | 1 | ||||
-rw-r--r-- | crypto/rc4/rc4test.c | 1 | ||||
-rw-r--r-- | crypto/ripemd/rmdtest.c | 1 | ||||
-rw-r--r-- | crypto/x509v3/pcy_tree.c | 2 |
29 files changed, 1 insertions, 36 deletions
diff --git a/crypto/asn1/asn1_gen.c b/crypto/asn1/asn1_gen.c index 87066e8374..9735cb5b45 100644 --- a/crypto/asn1/asn1_gen.c +++ b/crypto/asn1/asn1_gen.c @@ -419,7 +419,6 @@ static int parse_tagging(const char *vstart, int vlen, int *ptag, int *pclass) ASN1err(ASN1_F_PARSE_TAGGING, ASN1_R_INVALID_MODIFIER); ERR_add_error_data(2, "Char=", erch); return 0; - break; } } else @@ -769,7 +768,6 @@ static ASN1_TYPE *asn1_str2type(const char *str, int format, int utype) default: ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_UNSUPPORTED_TYPE); goto bad_str; - break; } atmp->type = utype; diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c index 7aae022e85..97e5b34579 100644 --- a/crypto/asn1/asn_mime.c +++ b/crypto/asn1/asn_mime.c @@ -246,7 +246,6 @@ static int asn1_write_micalg(BIO *out, STACK_OF(X509_ALGOR) *mdalgs) case NID_id_GostR3411_94: BIO_puts(out, "gostr3411-94"); goto err; - break; default: if (have_unknown) diff --git a/crypto/asn1/bio_asn1.c b/crypto/asn1/bio_asn1.c index 60189b3b2c..0b4fd1dd9e 100644 --- a/crypto/asn1/bio_asn1.c +++ b/crypto/asn1/bio_asn1.c @@ -422,7 +422,6 @@ static long asn1_bio_ctrl(BIO *b, int cmd, long arg1, void *arg2) BIO_clear_retry_flags(b); return 0; } - break; default: if (!b->next_bio) diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index 4595664409..abdeba4ce4 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -206,7 +206,6 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, } return asn1_d2i_ex_primitive(pval, in, len, it, tag, aclass, opt, ctx); - break; case ASN1_ITYPE_MSTRING: p = *in; diff --git a/crypto/asn1/tasn_enc.c b/crypto/asn1/tasn_enc.c index f04a6892a8..bc9429c89a 100644 --- a/crypto/asn1/tasn_enc.c +++ b/crypto/asn1/tasn_enc.c @@ -147,7 +147,6 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, return asn1_template_ex_i2d(pval, out, it->templates, tag, aclass); return asn1_i2d_ex_primitive(pval, out, it, tag, aclass); - break; case ASN1_ITYPE_MSTRING: return asn1_i2d_ex_primitive(pval, out, it, -1, aclass); @@ -608,7 +607,6 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype, case V_ASN1_BIT_STRING: return i2c_ASN1_BIT_STRING((ASN1_BIT_STRING *)*pval, cout ? &cout : NULL); - break; case V_ASN1_INTEGER: case V_ASN1_NEG_INTEGER: @@ -618,7 +616,6 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype, * These are all have the same content format as ASN1_INTEGER */ return i2c_ASN1_INTEGER((ASN1_INTEGER *)*pval, cout ? &cout : NULL); - break; case V_ASN1_OCTET_STRING: case V_ASN1_NUMERICSTRING: diff --git a/crypto/bf/bftest.c b/crypto/bf/bftest.c index 0b008f091c..e581bf50ab 100644 --- a/crypto/bf/bftest.c +++ b/crypto/bf/bftest.c @@ -294,7 +294,6 @@ int main(int argc, char *argv[]) printf("ERROR: %d\n", ret); # endif EXIT(ret); - return (0); } static int print_test_data(void) diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 885b969e05..737359722a 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -686,7 +686,6 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) break; case BIO_CTRL_DGRAM_GET_MTU: return data->mtu; - break; case BIO_CTRL_DGRAM_SET_MTU: data->mtu = num; ret = num; diff --git a/crypto/bn/bntest.c b/crypto/bn/bntest.c index e03c808554..4d109d8935 100644 --- a/crypto/bn/bntest.c +++ b/crypto/bn/bntest.c @@ -353,7 +353,6 @@ int main(int argc, char *argv[]) ERR_load_crypto_strings(); ERR_print_errors_fp(stderr); EXIT(1); - return (1); } int test_add(BIO *bp) diff --git a/crypto/bn/exptest.c b/crypto/bn/exptest.c index bf96c5ba52..2da8dc2ffe 100644 --- a/crypto/bn/exptest.c +++ b/crypto/bn/exptest.c @@ -254,5 +254,4 @@ int main(int argc, char *argv[]) printf("ERROR\n"); #endif EXIT(1); - return (1); } diff --git a/crypto/cast/casttest.c b/crypto/cast/casttest.c index dc31bc6604..9c6614bc8b 100644 --- a/crypto/cast/casttest.c +++ b/crypto/cast/casttest.c @@ -236,6 +236,5 @@ int main(int argc, char *argv[]) # endif EXIT(err); - return (err); } #endif diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c index 93c06cb00a..624c3f268f 100644 --- a/crypto/cms/cms_env.c +++ b/crypto/cms/cms_env.c @@ -832,11 +832,9 @@ int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri) case CMS_RECIPINFO_KEK: return cms_RecipientInfo_kekri_encrypt(cms, ri); - break; case CMS_RECIPINFO_PASS: return cms_RecipientInfo_pwri_crypt(cms, ri, 1); - break; default: CMSerr(CMS_F_CMS_RECIPIENTINFO_ENCRYPT, diff --git a/crypto/dh/dhtest.c b/crypto/dh/dhtest.c index 988322a703..9bb9a00212 100644 --- a/crypto/dh/dhtest.c +++ b/crypto/dh/dhtest.c @@ -211,7 +211,6 @@ int main(int argc, char *argv[]) printf("ERROR: %d\n", ret); # endif EXIT(ret); - return (ret); } static int cb(int p, int n, BN_GENCB *arg) diff --git a/crypto/dsa/dsatest.c b/crypto/dsa/dsatest.c index ed3b24a3f6..9b1308926f 100644 --- a/crypto/dsa/dsatest.c +++ b/crypto/dsa/dsatest.c @@ -228,7 +228,6 @@ int main(int argc, char **argv) printf("ERROR\n"); # endif EXIT(!ret); - return (0); } static int dsa_cb(int p, int n, BN_GENCB *arg) diff --git a/crypto/ecdh/ecdhtest.c b/crypto/ecdh/ecdhtest.c index 04b0cf30d0..5aed2b124b 100644 --- a/crypto/ecdh/ecdhtest.c +++ b/crypto/ecdh/ecdhtest.c @@ -543,7 +543,6 @@ int main(int argc, char *argv[]) ERR_remove_thread_state(NULL); CRYPTO_mem_leaks_fp(stderr); EXIT(ret); - return (ret); } # if 0 diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 111351852e..3d40b0481b 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -227,7 +227,6 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, default: return 0; - break; } } diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c index 6a456297bc..52c9a8690f 100644 --- a/crypto/evp/evp_pkey.c +++ b/crypto/evp/evp_pkey.c @@ -152,13 +152,11 @@ PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken) case PKCS8_OK: p8->broken = PKCS8_OK; return p8; - break; case PKCS8_NO_OCTET: p8->broken = PKCS8_NO_OCTET; p8->pkey->type = V_ASN1_SEQUENCE; return p8; - break; default: EVPerr(EVP_F_PKCS8_SET_BROKEN, EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE); diff --git a/crypto/evp/evp_test.c b/crypto/evp/evp_test.c index 597b9fe23c..b356131d64 100644 --- a/crypto/evp/evp_test.c +++ b/crypto/evp/evp_test.c @@ -126,7 +126,6 @@ static unsigned char *ustrsep(char **p, const char *sep) static int test1_exit(int ec) { EXIT(ec); - return (0); /* To keep some compilers quiet */ } /* Test copying of contexts */ diff --git a/crypto/hmac/hmactest.c b/crypto/hmac/hmactest.c index 3d130a03ed..492f5c5e81 100644 --- a/crypto/hmac/hmactest.c +++ b/crypto/hmac/hmactest.c @@ -150,7 +150,6 @@ int main(int argc, char *argv[]) } # endif /* OPENSSL_NO_MD5 */ EXIT(err); - return (0); } # ifndef OPENSSL_NO_MD5 diff --git a/crypto/idea/ideatest.c b/crypto/idea/ideatest.c index a967dd58a7..dd5d9ff12f 100644 --- a/crypto/idea/ideatest.c +++ b/crypto/idea/ideatest.c @@ -173,7 +173,6 @@ int main(int argc, char *argv[]) printf("ERROR: %d\n", err); # endif EXIT(err); - return (err); } static int cfb64_test(unsigned char *cfb_cipher) diff --git a/crypto/md4/md4test.c b/crypto/md4/md4test.c index 59f23bb5d6..9c82eb07f8 100644 --- a/crypto/md4/md4test.c +++ b/crypto/md4/md4test.c @@ -118,7 +118,6 @@ int main(int argc, char *argv[]) P++; } EXIT(err); - return (0); } static char *pt(unsigned char *md) diff --git a/crypto/md5/md5test.c b/crypto/md5/md5test.c index 0d0ab2d7d1..3016ee39d5 100644 --- a/crypto/md5/md5test.c +++ b/crypto/md5/md5test.c @@ -123,7 +123,6 @@ int main(int argc, char *argv[]) printf("ERROR: %d\n", err); # endif EXIT(err); - return (0); } static char *pt(unsigned char *md) diff --git a/crypto/mdc2/mdc2test.c b/crypto/mdc2/mdc2test.c index 8416252f80..a0d77a30ec 100644 --- a/crypto/mdc2/mdc2test.c +++ b/crypto/mdc2/mdc2test.c @@ -141,6 +141,5 @@ int main(int argc, char *argv[]) printf("ERROR: %d\n", ret); # endif EXIT(ret); - return (ret); } #endif diff --git a/crypto/ocsp/ocsp_ht.c b/crypto/ocsp/ocsp_ht.c index 446882d35f..aca0d48879 100644 --- a/crypto/ocsp/ocsp_ht.c +++ b/crypto/ocsp/ocsp_ht.c @@ -508,8 +508,6 @@ int OCSP_REQ_CTX_nbio(OCSP_REQ_CTX *rctx) rctx->state = OHS_DONE; return 1; - break; - case OHS_DONE: return 1; diff --git a/crypto/pkcs12/p12_kiss.c b/crypto/pkcs12/p12_kiss.c index ee476c38f4..4fd8b8c229 100644 --- a/crypto/pkcs12/p12_kiss.c +++ b/crypto/pkcs12/p12_kiss.c @@ -287,11 +287,9 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, case NID_safeContentsBag: return parse_bags(bag->value.safes, pass, passlen, pkey, ocerts); - break; default: return 1; - break; } return 1; } diff --git a/crypto/rand/randtest.c b/crypto/rand/randtest.c index 3c2628cb15..267752e4f5 100644 --- a/crypto/rand/randtest.c +++ b/crypto/rand/randtest.c @@ -195,5 +195,4 @@ int main(int argc, char **argv) printf("ERROR: %d\n", err); #endif EXIT(err); - return (err); } diff --git a/crypto/rc2/rc2test.c b/crypto/rc2/rc2test.c index f7eae13c26..ae57e56d39 100644 --- a/crypto/rc2/rc2test.c +++ b/crypto/rc2/rc2test.c @@ -147,7 +147,6 @@ int main(int argc, char *argv[]) printf("ERROR: %d\n", err); # endif EXIT(err); - return (err); } #endif diff --git a/crypto/rc4/rc4test.c b/crypto/rc4/rc4test.c index e2bfbfa1fc..a1f96e4cb8 100644 --- a/crypto/rc4/rc4test.c +++ b/crypto/rc4/rc4test.c @@ -230,6 +230,5 @@ int main(int argc, char *argv[]) printf("ERROR: %d\n", err); # endif EXIT(err); - return (0); } #endif diff --git a/crypto/ripemd/rmdtest.c b/crypto/ripemd/rmdtest.c index 86054c7b82..b0ebb12c27 100644 --- a/crypto/ripemd/rmdtest.c +++ b/crypto/ripemd/rmdtest.c @@ -128,7 +128,6 @@ int main(int argc, char *argv[]) P++; } EXIT(err); - return (0); } static char *pt(unsigned char *md) diff --git a/crypto/x509v3/pcy_tree.c b/crypto/x509v3/pcy_tree.c index 8d02092cde..d4b550e4cf 100644 --- a/crypto/x509v3/pcy_tree.c +++ b/crypto/x509v3/pcy_tree.c @@ -530,7 +530,7 @@ static int tree_prune(X509_POLICY_TREE *tree, X509_POLICY_LEVEL *curr) } } - return 1; + /* Unreachable */ } |