mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-05-17 23:56:39 +00:00
Remove use of non-standard zero variadic macros
These are a gnu extension warned against by: gnu-zero-variadic-macro-arguments
This commit is contained in:
parent
49f6178c3e
commit
3a0fd7726b
@ -93,10 +93,10 @@ private:
|
|||||||
} // namespace BCLog
|
} // namespace BCLog
|
||||||
|
|
||||||
|
|
||||||
#define LOG_TIME_MILLIS(end_msg, ...) \
|
#define LOG_TIME_MILLIS_WITH_CATEGORY(end_msg, log_category) \
|
||||||
BCLog::Timer<std::chrono::milliseconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, ## __VA_ARGS__)
|
BCLog::Timer<std::chrono::milliseconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, log_category)
|
||||||
#define LOG_TIME_SECONDS(end_msg, ...) \
|
#define LOG_TIME_SECONDS(end_msg) \
|
||||||
BCLog::Timer<std::chrono::seconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, ## __VA_ARGS__)
|
BCLog::Timer<std::chrono::seconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg)
|
||||||
|
|
||||||
|
|
||||||
#endif // BITCOIN_LOGGING_TIMER_H
|
#endif // BITCOIN_LOGGING_TIMER_H
|
||||||
|
@ -2279,11 +2279,11 @@ bool CChainState::FlushStateToDisk(
|
|||||||
LOCK(cs_LastBlockFile);
|
LOCK(cs_LastBlockFile);
|
||||||
if (fPruneMode && (fCheckForPruning || nManualPruneHeight > 0) && !fReindex) {
|
if (fPruneMode && (fCheckForPruning || nManualPruneHeight > 0) && !fReindex) {
|
||||||
if (nManualPruneHeight > 0) {
|
if (nManualPruneHeight > 0) {
|
||||||
LOG_TIME_MILLIS("find files to prune (manual)", BCLog::BENCH);
|
LOG_TIME_MILLIS_WITH_CATEGORY("find files to prune (manual)", BCLog::BENCH);
|
||||||
|
|
||||||
FindFilesToPruneManual(setFilesToPrune, nManualPruneHeight);
|
FindFilesToPruneManual(setFilesToPrune, nManualPruneHeight);
|
||||||
} else {
|
} else {
|
||||||
LOG_TIME_MILLIS("find files to prune", BCLog::BENCH);
|
LOG_TIME_MILLIS_WITH_CATEGORY("find files to prune", BCLog::BENCH);
|
||||||
|
|
||||||
FindFilesToPrune(setFilesToPrune, chainparams.PruneAfterHeight());
|
FindFilesToPrune(setFilesToPrune, chainparams.PruneAfterHeight());
|
||||||
fCheckForPruning = false;
|
fCheckForPruning = false;
|
||||||
@ -2321,7 +2321,7 @@ bool CChainState::FlushStateToDisk(
|
|||||||
return AbortNode(state, "Disk space is too low!", _("Error: Disk space is too low!").translated, CClientUIInterface::MSG_NOPREFIX);
|
return AbortNode(state, "Disk space is too low!", _("Error: Disk space is too low!").translated, CClientUIInterface::MSG_NOPREFIX);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
LOG_TIME_MILLIS("write block and undo data to disk", BCLog::BENCH);
|
LOG_TIME_MILLIS_WITH_CATEGORY("write block and undo data to disk", BCLog::BENCH);
|
||||||
|
|
||||||
// First make sure all block and undo data is flushed to disk.
|
// First make sure all block and undo data is flushed to disk.
|
||||||
FlushBlockFile();
|
FlushBlockFile();
|
||||||
@ -2329,7 +2329,7 @@ bool CChainState::FlushStateToDisk(
|
|||||||
|
|
||||||
// Then update all block file information (which may refer to block and undo files).
|
// Then update all block file information (which may refer to block and undo files).
|
||||||
{
|
{
|
||||||
LOG_TIME_MILLIS("write block index to disk", BCLog::BENCH);
|
LOG_TIME_MILLIS_WITH_CATEGORY("write block index to disk", BCLog::BENCH);
|
||||||
|
|
||||||
std::vector<std::pair<int, const CBlockFileInfo*> > vFiles;
|
std::vector<std::pair<int, const CBlockFileInfo*> > vFiles;
|
||||||
vFiles.reserve(setDirtyFileInfo.size());
|
vFiles.reserve(setDirtyFileInfo.size());
|
||||||
@ -2349,7 +2349,7 @@ bool CChainState::FlushStateToDisk(
|
|||||||
}
|
}
|
||||||
// Finally remove any pruned files
|
// Finally remove any pruned files
|
||||||
if (fFlushForPrune) {
|
if (fFlushForPrune) {
|
||||||
LOG_TIME_MILLIS("unlink pruned files", BCLog::BENCH);
|
LOG_TIME_MILLIS_WITH_CATEGORY("unlink pruned files", BCLog::BENCH);
|
||||||
|
|
||||||
UnlinkPrunedFiles(setFilesToPrune);
|
UnlinkPrunedFiles(setFilesToPrune);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user