mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Merge #10565: [coverage] Remove subtrees and benchmarks from coverage report
d5711f4Filter subtrees and and benchmarks from coverage report (Andrew Chow)405b86aReplace lcov -r commands with faster way (Andrew Chow)c8914b9Have `make cov` optionally include branch coverage statistics (Andrew Chow) Tree-SHA512: 9c349a7baeb7430ea586617c52f91177df58e3546d6dc573e26815ddb79e30ab1873542d85ac1daca5e1fb2c6d6c8965824b42d027b6b0496a744af57b095852
This commit is contained in:
12
src/util.h
12
src/util.h
@@ -122,6 +122,17 @@ int LogPrintStr(const std::string &str);
|
||||
/** Get format string from VA_ARGS for error reporting */
|
||||
template<typename... Args> std::string FormatStringFromLogArgs(const char *fmt, const Args&... args) { return fmt; }
|
||||
|
||||
static inline void MarkUsed() {}
|
||||
template<typename T, typename... Args> static inline void MarkUsed(const T& t, const Args&... args)
|
||||
{
|
||||
(void)t;
|
||||
MarkUsed(args...);
|
||||
}
|
||||
|
||||
#ifdef USE_COVERAGE
|
||||
#define LogPrintf(...) do { MarkUsed(__VA_ARGS__); } while(0)
|
||||
#define LogPrint(category, ...) do { MarkUsed(__VA_ARGS__); } while(0)
|
||||
#else
|
||||
#define LogPrintf(...) do { \
|
||||
std::string _log_msg_; /* Unlikely name to avoid shadowing variables */ \
|
||||
try { \
|
||||
@@ -138,6 +149,7 @@ template<typename... Args> std::string FormatStringFromLogArgs(const char *fmt,
|
||||
LogPrintf(__VA_ARGS__); \
|
||||
} \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
template<typename... Args>
|
||||
bool error(const char* fmt, const Args&... args)
|
||||
|
||||
Reference in New Issue
Block a user