mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 02:33:24 -03:00
util: Use compile-time check for LogConnectFailure
This commit is contained in:
parent
fa7087b896
commit
fa5bc450d5
3 changed files with 2 additions and 3 deletions
|
@ -557,7 +557,8 @@ std::unique_ptr<Sock> CreateSockOS(int domain, int type, int protocol)
|
|||
std::function<std::unique_ptr<Sock>(int, int, int)> CreateSock = CreateSockOS;
|
||||
|
||||
template<typename... Args>
|
||||
static void LogConnectFailure(bool manual_connection, const char* fmt, const Args&... args) {
|
||||
static void LogConnectFailure(bool manual_connection, util::ConstevalFormatString<sizeof...(Args)> fmt, const Args&... args)
|
||||
{
|
||||
std::string error_message = tfm::format(fmt, args...);
|
||||
if (manual_connection) {
|
||||
LogPrintf("%s\n", error_message);
|
||||
|
|
|
@ -17,7 +17,6 @@ import sys
|
|||
|
||||
FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS = [
|
||||
'tfm::format,1', # Assuming tfm::::format(std::ostream&, ...
|
||||
'LogConnectFailure,1',
|
||||
'LogError,0',
|
||||
'LogWarning,0',
|
||||
'LogInfo,0',
|
||||
|
|
|
@ -13,7 +13,6 @@ import re
|
|||
import sys
|
||||
|
||||
FALSE_POSITIVES = [
|
||||
("src/netbase.cpp", "LogConnectFailure(bool manual_connection, const char* fmt, const Args&... args)"),
|
||||
("src/clientversion.cpp", "strprintf(_(COPYRIGHT_HOLDERS).translated, COPYRIGHT_HOLDERS_SUBSTITUTION)"),
|
||||
("src/test/translation_tests.cpp", "strprintf(format, arg)"),
|
||||
("src/validationinterface.cpp", "LogDebug(BCLog::VALIDATION, fmt \"\\n\", __VA_ARGS__)"),
|
||||
|
|
Loading…
Add table
Reference in a new issue