From 2f0af52b423368e8fa7a6f532f945812e88c809d Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 14 Jul 2017 18:35:36 +0200 Subject: Fix gcc-7 warnings about missing fall thru comments. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/3936) --- crypto/bn/bn_lib.c | 6 ++++++ crypto/bn/bn_mul.c | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'crypto/bn') diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 17d34c319e..fd06d08a83 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -295,10 +295,13 @@ static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words) switch (b->top & 3) { case 3: A[2] = B[2]; + /* fall thru */ case 2: A[1] = B[1]; + /* fall thru */ case 1: A[0] = B[0]; + /* fall thru */ case 0: /* Without the "case 0" some old optimizers got this wrong. */ ; @@ -390,10 +393,13 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b) switch (b->top & 3) { case 3: A[2] = B[2]; + /* fall thru */ case 2: A[1] = B[1]; + /* fall thru */ case 1: A[0] = B[0]; + /* fall thru */ case 0:; } #else diff --git a/crypto/bn/bn_mul.c b/crypto/bn/bn_mul.c index 0892704fa9..a1abc5b05a 100644 --- a/crypto/bn/bn_mul.c +++ b/crypto/bn/bn_mul.c @@ -115,10 +115,12 @@ BN_ULONG bn_sub_part_words(BN_ULONG *r, r[1] = a[1]; if (--dl <= 0) break; + /* fall thru */ case 2: r[2] = a[2]; if (--dl <= 0) break; + /* fall thru */ case 3: r[3] = a[3]; if (--dl <= 0) @@ -206,10 +208,12 @@ BN_ULONG bn_add_part_words(BN_ULONG *r, r[1] = b[1]; if (++dl >= 0) break; + /* fall thru */ case 2: r[2] = b[2]; if (++dl >= 0) break; + /* fall thru */ case 3: r[3] = b[3]; if (++dl >= 0) @@ -276,10 +280,12 @@ BN_ULONG bn_add_part_words(BN_ULONG *r, r[1] = a[1]; if (--dl <= 0) break; + /* fall thru */ case 2: r[2] = a[2]; if (--dl <= 0) break; + /* fall thru */ case 3: r[3] = a[3]; if (--dl <= 0) -- cgit v1.2.3