Clear out a bunch of -Wextra-semi warnings.

Unfortunately, it's not enough to be able to turn it on thanks to the
PURE_VIRTUAL macro. But it gets us most of the way there.

Change-Id: Ie6ad5119fcfd420115fa49d7312f3586890244f4
Reviewed-on: https://boringssl-review.googlesource.com/c/34949
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2019-02-21 10:49:57 -06:00 committed by CQ bot account: commit-bot@chromium.org
parent 0326105aa9
commit f109f20873
12 changed files with 17 additions and 17 deletions

View File

@ -499,8 +499,8 @@ err:
struct built_in_groups_st {
EC_GROUP *groups[OPENSSL_NUM_BUILT_IN_CURVES];
};
DEFINE_BSS_GET(struct built_in_groups_st, built_in_groups);
DEFINE_STATIC_MUTEX(built_in_groups_lock);
DEFINE_BSS_GET(struct built_in_groups_st, built_in_groups)
DEFINE_STATIC_MUTEX(built_in_groups_lock)
EC_GROUP *EC_GROUP_new_by_curve_name(int nid) {
struct built_in_groups_st *groups = built_in_groups_bss_get();

View File

@ -82,7 +82,7 @@
#include "../../internal.h"
DEFINE_STATIC_EX_DATA_CLASS(g_ec_ex_data_class);
DEFINE_STATIC_EX_DATA_CLASS(g_ec_ex_data_class)
static EC_WRAPPED_SCALAR *ec_wrapped_scalar_new(const EC_GROUP *group) {
EC_WRAPPED_SCALAR *wrapped = OPENSSL_malloc(sizeof(EC_WRAPPED_SCALAR));

View File

@ -1120,6 +1120,6 @@ DEFINE_METHOD_FUNCTION(EC_METHOD, EC_GFp_nistp224_method) {
out->scalar_inv_montgomery = ec_simple_scalar_inv_montgomery;
out->scalar_inv_montgomery_vartime = ec_GFp_simple_mont_inv_mod_ord_vartime;
out->cmp_x_coordinate = ec_GFp_simple_cmp_x_coordinate;
};
}
#endif // BORINGSSL_HAS_UINT128 && !SMALL

View File

@ -654,7 +654,7 @@ DEFINE_METHOD_FUNCTION(EC_METHOD, EC_GFp_nistz256_method) {
out->scalar_inv_montgomery = ecp_nistz256_inv_mod_ord;
out->scalar_inv_montgomery_vartime = ecp_nistz256_mont_inv_mod_ord_vartime;
out->cmp_x_coordinate = ecp_nistz256_cmp_x_coordinate;
};
}
#endif /* !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && \
!defined(OPENSSL_SMALL) */

View File

@ -120,7 +120,7 @@ static ssize_t boringssl_getrandom(void *buf, size_t buf_len, unsigned flags) {
#endif // OPENSSL_LINUX
// rand_lock is used to protect the |*_requested| variables.
DEFINE_STATIC_MUTEX(rand_lock);
DEFINE_STATIC_MUTEX(rand_lock)
// The following constants are magic values of |urandom_fd|.
static const int kUnset = 0;
@ -128,12 +128,12 @@ static const int kHaveGetrandom = -3;
// urandom_fd_requested is set by |RAND_set_urandom_fd|. It's protected by
// |rand_lock|.
DEFINE_BSS_GET(int, urandom_fd_requested);
DEFINE_BSS_GET(int, urandom_fd_requested)
// urandom_fd is a file descriptor to /dev/urandom. It's protected by |once|.
DEFINE_BSS_GET(int, urandom_fd);
DEFINE_BSS_GET(int, urandom_fd)
DEFINE_STATIC_ONCE(rand_once);
DEFINE_STATIC_ONCE(rand_once)
// init_once initializes the state of this module to values previously
// requested. This is the only function that modifies |urandom_fd| and

View File

@ -80,7 +80,7 @@
// Cryptography.io depends on this error code.
OPENSSL_DECLARE_ERROR_REASON(RSA, BLOCK_TYPE_IS_NOT_02)
DEFINE_STATIC_EX_DATA_CLASS(g_rsa_ex_data_class);
DEFINE_STATIC_EX_DATA_CLASS(g_rsa_ex_data_class)
RSA *RSA_new(void) { return RSA_new_method(NULL); }

View File

@ -23,7 +23,7 @@ extern "C" {
#endif
DECLARE_LHASH_OF(CRYPTO_BUFFER);
DECLARE_LHASH_OF(CRYPTO_BUFFER)
struct crypto_buffer_st {
CRYPTO_BUFFER_POOL *pool;

View File

@ -77,7 +77,7 @@ extern "C" {
// int bar;
// };
//
// DEFINE_LHASH_OF(struct foo);
// DEFINE_LHASH_OF(struct foo)
//
// Although note that the hash table will contain /pointers/ to |foo|.
//

View File

@ -78,7 +78,7 @@ extern "C" {
// int bar;
// } FOO;
//
// DEFINE_STACK_OF(FOO);
// DEFINE_STACK_OF(FOO)
//
// Although note that the stack will contain /pointers/ to |FOO|.
//

View File

@ -2114,7 +2114,7 @@ BSSL_NAMESPACE_END
DEFINE_LHASH_OF(SSL_SESSION)
DEFINE_NAMED_STACK_OF(CertCompressionAlg, bssl::CertCompressionAlg);
DEFINE_NAMED_STACK_OF(CertCompressionAlg, bssl::CertCompressionAlg)
BSSL_NAMESPACE_BEGIN

View File

@ -234,7 +234,7 @@ class CECPQ2KeyShare : public SSLKeyShare {
}
return true;
};
}
bool Accept(CBB *out_public_key, Array<uint8_t> *out_secret,
uint8_t *out_alert, Span<const uint8_t> peer_key) override {
@ -293,7 +293,7 @@ class CECPQ2KeyShare : public SSLKeyShare {
*out_secret = std::move(secret);
return true;
};
}
private:
uint8_t x25519_private_key_[32];

View File

@ -1075,6 +1075,6 @@ DEFINE_METHOD_FUNCTION(EC_METHOD, EC_GFp_nistp256_method) {
out->scalar_inv_montgomery = ec_simple_scalar_inv_montgomery;
out->scalar_inv_montgomery_vartime = ec_GFp_simple_mont_inv_mod_ord_vartime;
out->cmp_x_coordinate = ec_GFp_nistp256_cmp_x_coordinate;
};
}
#undef BORINGSSL_NISTP256_64BIT