chore: fix misc-use-anonymous-namespace warnings from clang-tidy (#6488)

This commit is contained in:
Charles Kerr
2024-01-04 23:12:51 -06:00
committed by GitHub
parent 23eb0ef92d
commit 646883174b
13 changed files with 512 additions and 576 deletions

View File

@@ -31,9 +31,9 @@ using TR_WC_RNG = RNG;
#define TR_CRYPTO_X509_FALLBACK
#include "crypto-utils-fallback.cc" // NOLINT(bugprone-suspicious-include)
// ---
static void log_wolfssl_error(int error_code, char const* file, int line)
namespace
{
void log_wolfssl_error(int error_code, char const* file, int line)
{
if (tr_logLevelIsActive(TR_LOG_ERROR))
{
@@ -49,7 +49,7 @@ static void log_wolfssl_error(int error_code, char const* file, int line)
}
}
static bool check_wolfssl_result(int result, char const* file, int line)
bool check_wolfssl_result(int result, char const* file, int line)
{
bool const ret = result == 0;
@@ -65,7 +65,7 @@ static bool check_wolfssl_result(int result, char const* file, int line)
// ---
static TR_WC_RNG* get_rng()
TR_WC_RNG* get_rng()
{
static TR_WC_RNG rng;
static bool rng_initialized = false;
@@ -83,13 +83,10 @@ static TR_WC_RNG* get_rng()
return &rng;
}
static std::mutex rng_mutex_;
std::mutex rng_mutex_;
// ---
namespace
{
class Sha1Impl final : public tr_sha1
{
public: