diff --git a/crypto/fipsmodule/ec/ec.c b/crypto/fipsmodule/ec/ec.c index 4ea5529b..a0305a65 100644 --- a/crypto/fipsmodule/ec/ec.c +++ b/crypto/fipsmodule/ec/ec.c @@ -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(); diff --git a/crypto/fipsmodule/ec/ec_key.c b/crypto/fipsmodule/ec/ec_key.c index 4bc12a07..04650ed7 100644 --- a/crypto/fipsmodule/ec/ec_key.c +++ b/crypto/fipsmodule/ec/ec_key.c @@ -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)); diff --git a/crypto/fipsmodule/ec/p224-64.c b/crypto/fipsmodule/ec/p224-64.c index dd3098f5..27496861 100644 --- a/crypto/fipsmodule/ec/p224-64.c +++ b/crypto/fipsmodule/ec/p224-64.c @@ -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 diff --git a/crypto/fipsmodule/ec/p256-x86_64.c b/crypto/fipsmodule/ec/p256-x86_64.c index 93772d6e..dd8108d2 100644 --- a/crypto/fipsmodule/ec/p256-x86_64.c +++ b/crypto/fipsmodule/ec/p256-x86_64.c @@ -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) */ diff --git a/crypto/fipsmodule/rand/urandom.c b/crypto/fipsmodule/rand/urandom.c index d969675e..56e4fbd2 100644 --- a/crypto/fipsmodule/rand/urandom.c +++ b/crypto/fipsmodule/rand/urandom.c @@ -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 diff --git a/crypto/fipsmodule/rsa/rsa.c b/crypto/fipsmodule/rsa/rsa.c index efb2f9b6..724de69e 100644 --- a/crypto/fipsmodule/rsa/rsa.c +++ b/crypto/fipsmodule/rsa/rsa.c @@ -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); } diff --git a/crypto/pool/internal.h b/crypto/pool/internal.h index 5b288ebb..ed91de61 100644 --- a/crypto/pool/internal.h +++ b/crypto/pool/internal.h @@ -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; diff --git a/include/openssl/lhash.h b/include/openssl/lhash.h index c82bb8e6..29e09c83 100644 --- a/include/openssl/lhash.h +++ b/include/openssl/lhash.h @@ -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|. // diff --git a/include/openssl/stack.h b/include/openssl/stack.h index 924228a5..04e942cb 100644 --- a/include/openssl/stack.h +++ b/include/openssl/stack.h @@ -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|. // diff --git a/ssl/internal.h b/ssl/internal.h index 37d3177e..0df9a5fb 100644 --- a/ssl/internal.h +++ b/ssl/internal.h @@ -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 diff --git a/ssl/ssl_key_share.cc b/ssl/ssl_key_share.cc index 8556c4f4..78d2aa16 100644 --- a/ssl/ssl_key_share.cc +++ b/ssl/ssl_key_share.cc @@ -234,7 +234,7 @@ class CECPQ2KeyShare : public SSLKeyShare { } return true; - }; + } bool Accept(CBB *out_public_key, Array *out_secret, uint8_t *out_alert, Span 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]; diff --git a/third_party/fiat/p256.c b/third_party/fiat/p256.c index 05fe2b9d..ebc5de6f 100644 --- a/third_party/fiat/p256.c +++ b/third_party/fiat/p256.c @@ -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