From c2b295881f852a9096c834334d6b84c988f579f5 Mon Sep 17 00:00:00 2001 From: fanquake Date: Sun, 1 May 2022 10:39:40 +0100 Subject: [PATCH] tidy: add readability-redundant-declaration --- src/.clang-tidy | 13 +++++++++++-- src/netaddress.cpp | 3 --- src/randomenv.cpp | 3 +-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/.clang-tidy b/src/.clang-tidy index fda95967f54..b1f543f610b 100644 --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -1,2 +1,11 @@ -Checks: '-*,bugprone-argument-comment,modernize-use-nullptr' -WarningsAsErrors: 'bugprone-argument-comment,modernize-use-nullptr' +Checks: ' +-*, +bugprone-argument-comment, +modernize-use-nullptr, +readability-redundant-declaration, +' +WarningsAsErrors: ' +bugprone-argument-comment, +modernize-use-nullptr, +readability-redundant-declaration, +' diff --git a/src/netaddress.cpp b/src/netaddress.cpp index 7bf11a3e485..9717f7abcec 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -20,9 +20,6 @@ #include #include -constexpr size_t CNetAddr::V1_SERIALIZATION_SIZE; -constexpr size_t CNetAddr::MAX_ADDRV2_SIZE; - CNetAddr::BIP155Network CNetAddr::GetBIP155Network() const { switch (m_net) { diff --git a/src/randomenv.cpp b/src/randomenv.cpp index 53ebeb31cdf..c5dca346d68 100644 --- a/src/randomenv.cpp +++ b/src/randomenv.cpp @@ -57,8 +57,7 @@ #include #endif -//! Necessary on some platforms -extern char** environ; +extern char** environ; // NOLINT(readability-redundant-declaration): Necessary on some platforms namespace {