diff mbox series

[API-NEXT,v2,3/3] linux-gen: crypto: fix fallthrough error

Message ID 1514372409-29331-4-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v2,1/3] doc: drop driver-api-guide remnants | expand

Commit Message

Github ODP bot Dec. 27, 2017, 11 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


GCC-7 will output "may fall through" error if fallthrough comment is
present, but before preprocessor directive. Move these comments after
endif directives.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 369 (lumag:api-next-fixes)
 ** https://github.com/Linaro/odp/pull/369
 ** Patch: https://github.com/Linaro/odp/pull/369.patch
 ** Base sha: a5f07dbf95f982b7c5898434e56164ff976c0a0f
 ** Merge commit sha: b9298b6e4d26f720f422ca57f1ea911597c955ef
 **/
 platform/linux-generic/odp_crypto.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index 69e6d0dad..2038aa46b 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -962,8 +962,8 @@  odp_crypto_session_create(odp_crypto_session_param_t *param,
 	case ODP_AUTH_ALG_MD5_96:
 		/* Fixed digest tag length with deprecated algo */
 		session->p.auth_digest_len = 96 / 8;
-		/* Fallthrough */
 #endif
+		/* Fallthrough */
 	case ODP_AUTH_ALG_MD5_HMAC:
 		rc = process_auth_param(session, 16, EVP_md5());
 		break;
@@ -974,8 +974,8 @@  odp_crypto_session_create(odp_crypto_session_param_t *param,
 	case ODP_AUTH_ALG_SHA256_128:
 		/* Fixed digest tag length with deprecated algo */
 		session->p.auth_digest_len = 128 / 8;
-		/* Fallthrough */
 #endif
+		/* Fallthrough */
 	case ODP_AUTH_ALG_SHA256_HMAC:
 		rc = process_auth_param(session, 32, EVP_sha256());
 		break;
@@ -988,8 +988,8 @@  odp_crypto_session_create(odp_crypto_session_param_t *param,
 			aes_gcm = 1;
 		/* Fixed digest tag length with deprecated algo */
 		session->p.auth_digest_len = 16;
-		/* Fallthrough */
 #endif
+		/* Fallthrough */
 	case ODP_AUTH_ALG_AES_GCM:
 		/* AES-GCM requires to do both auth and
 		 * cipher at the same time */