From ede72ff1d895645fbfed6bd6378c3fa374501fcf Mon Sep 17 00:00:00 2001 From: SChernykh Date: Fri, 30 Jun 2023 16:18:02 +0200 Subject: [PATCH] Suppress a noisy Coverity warning --- src/log.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/log.h b/src/log.h index d9d2ab2..d5e8fec 100644 --- a/src/log.h +++ b/src/log.h @@ -492,16 +492,19 @@ struct DummyStream } }; +#ifdef __COVERITY__ +// Coverity doesn't like this macro - CID 393138: Big parameter passed by value (PASS_BY_VALUE) +#define SIDE_EFFECT_CHECK(level, ...) +#else #define SIDE_EFFECT_CHECK(level, ...) \ - do { \ - if (0) { \ - MSVC_PRAGMA(warning(suppress:26444)) \ - [=]() { \ - log::DummyStream x; \ - x << (level) << __VA_ARGS__; \ - }; \ - } \ - } while (0) + if (0) { \ + MSVC_PRAGMA(warning(suppress:26444)) \ + [=]() { \ + log::DummyStream x; \ + x << (level) << __VA_ARGS__; \ + }; \ + } +#endif #ifdef P2POOL_LOG_DISABLE