Fix more clang-tidy warnings.

Changes imported from Chih-hung Hsieh's CL at
https://android-review.googlesource.com/c/235696/.

Change-Id: I02f170f0a059c21a8d6f221dcc779f6476f36bbf
Reviewed-on: https://boringssl-review.googlesource.com/12026
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/crypto/bio/bio_test.cc b/crypto/bio/bio_test.cc
index cbc4fde..01b93f6 100644
--- a/crypto/bio/bio_test.cc
+++ b/crypto/bio/bio_test.cc
@@ -59,7 +59,7 @@
 
 class ScopedSocket {
  public:
-  ScopedSocket(int sock) : sock_(sock) {}
+  explicit ScopedSocket(int sock) : sock_(sock) {}
   ~ScopedSocket() {
     closesocket(sock_);
   }
diff --git a/include/openssl/bn.h b/include/openssl/bn.h
index 66945cb..01f75ec 100644
--- a/include/openssl/bn.h
+++ b/include/openssl/bn.h
@@ -582,7 +582,7 @@
 /* Random and prime number generation. */
 
 /* The following are values for the |top| parameter of |BN_rand|. */
-#define BN_RAND_TOP_ANY    -1
+#define BN_RAND_TOP_ANY    (-1)
 #define BN_RAND_TOP_ONE     0
 #define BN_RAND_TOP_TWO     1
 
diff --git a/tool/digest.cc b/tool/digest.cc
index 6056b0f..d3a7222 100644
--- a/tool/digest.cc
+++ b/tool/digest.cc
@@ -64,8 +64,9 @@
   };
 
   Source() : is_stdin_(false) {}
-  Source(Type) : is_stdin_(true) {}
-  Source(const std::string &name) : is_stdin_(false), filename_(name) {}
+  explicit Source(Type) : is_stdin_(true) {}
+  explicit Source(const std::string &name)
+      : is_stdin_(false), filename_(name) {}
 
   bool is_stdin() const { return is_stdin_; }
   const std::string &filename() const { return filename_; }
diff --git a/tool/speed.cc b/tool/speed.cc
index 8c6a710..f16a9eb 100644
--- a/tool/speed.cc
+++ b/tool/speed.cc
@@ -298,7 +298,7 @@
          SpeedHashChunk(md, name + " (8192 bytes)", 8192);
 }
 
-static bool SpeedRandomChunk(const std::string name, size_t chunk_len) {
+static bool SpeedRandomChunk(const std::string &name, size_t chunk_len) {
   uint8_t scratch[8192];
 
   if (chunk_len > sizeof(scratch)) {