From 1e547722d412a77f2708bf92cfef75c287d2cb9e Mon Sep 17 00:00:00 2001 From: Manoj Gupta Date: Mon, 26 Aug 2019 16:30:06 -0700 Subject: [PATCH] Add OPENSSL_FALLTHROUGH to a few files. This is a followup of https://boringssl-review.googlesource.com/c/boringssl/+/37244 There are a few files that needs the OPENSSL_FALLTHROUGH annotation so that they compile with clang. Bug: chromium:997709 Test: CQ Change-Id: I05f9f85fdb39fbcb8c1193a7b0c335287022719d Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37247 Commit-Queue: David Benjamin Reviewed-by: David Benjamin --- crypto/asn1/tasn_enc.c | 2 +- crypto/fipsmodule/cipher/cipher.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/asn1/tasn_enc.c b/crypto/asn1/tasn_enc.c index d89ec8a73..3722a5191 100644 --- a/crypto/asn1/tasn_enc.c +++ b/crypto/asn1/tasn_enc.c @@ -192,7 +192,7 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, /* Use indefinite length constructed if requested */ if (aclass & ASN1_TFLG_NDEF) ndef = 2; - /* fall through */ + OPENSSL_FALLTHROUGH; case ASN1_ITYPE_SEQUENCE: i = asn1_enc_restore(&seqcontlen, out, pval, it); diff --git a/crypto/fipsmodule/cipher/cipher.c b/crypto/fipsmodule/cipher/cipher.c index 7c6fa8e48..c50c6c5cc 100644 --- a/crypto/fipsmodule/cipher/cipher.c +++ b/crypto/fipsmodule/cipher/cipher.c @@ -192,7 +192,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, case EVP_CIPH_CFB_MODE: ctx->num = 0; - // fall-through + OPENSSL_FALLTHROUGH; case EVP_CIPH_CBC_MODE: assert(EVP_CIPHER_CTX_iv_length(ctx) <= sizeof(ctx->iv));