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>
diff --git a/crypto/fipsmodule/ec/ec.c b/crypto/fipsmodule/ec/ec.c
index 4ea5529..a0305a6 100644
--- a/crypto/fipsmodule/ec/ec.c
+++ b/crypto/fipsmodule/ec/ec.c
@@ -499,8 +499,8 @@
 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 4bc12a0..04650ed 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 dd3098f..2749686 100644
--- a/crypto/fipsmodule/ec/p224-64.c
+++ b/crypto/fipsmodule/ec/p224-64.c
@@ -1120,6 +1120,6 @@
   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 93772d6..dd8108d 100644
--- a/crypto/fipsmodule/ec/p256-x86_64.c
+++ b/crypto/fipsmodule/ec/p256-x86_64.c
@@ -654,7 +654,7 @@
   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 d969675..56e4fbd 100644
--- a/crypto/fipsmodule/rand/urandom.c
+++ b/crypto/fipsmodule/rand/urandom.c
@@ -120,7 +120,7 @@
 #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 @@
 
 // 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 efb2f9b..724de69 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 5b288eb..ed91de6 100644
--- a/crypto/pool/internal.h
+++ b/crypto/pool/internal.h
@@ -23,7 +23,7 @@
 #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 c82bb8e..29e09c8 100644
--- a/include/openssl/lhash.h
+++ b/include/openssl/lhash.h
@@ -77,7 +77,7 @@
 //     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 924228a..04e942c 100644
--- a/include/openssl/stack.h
+++ b/include/openssl/stack.h
@@ -78,7 +78,7 @@
 //     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 37d3177..0df9a5f 100644
--- a/ssl/internal.h
+++ b/ssl/internal.h
@@ -2114,7 +2114,7 @@
 
 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 8556c4f..78d2aa1 100644
--- a/ssl/ssl_key_share.cc
+++ b/ssl/ssl_key_share.cc
@@ -234,7 +234,7 @@
     }
 
     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 @@
 
     *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 05fe2b9..ebc5de6 100644
--- a/third_party/fiat/p256.c
+++ b/third_party/fiat/p256.c
@@ -1075,6 +1075,6 @@
   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