Skip to content

Commit 973f7dd

Browse files
committed
CBD-6348: [BP] Disable fmt format check for WIN32
Disable it on win32 as it didn't work on 2019 and doesn't work on 2022 (which we're trying to upgrade to) and not tie it to the compiler so we'll have to fight the same battle the next time Change-Id: Ibfe20a700d641a6319259f400ce4da4b3b803a28 Reviewed-on: https://review.couchbase.org/c/kv_engine/+/234971 Well-Formed: Restriction Checker Reviewed-by: Mohammad Zaeem <[email protected]> Tested-by: Trond Norbye <[email protected]>
1 parent acd2546 commit 973f7dd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

engines/ep/src/bucket_logger.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ std::shared_ptr<BucketLogger>& getGlobalBucketLogger();
221221
// Various implementation details for the EP_LOG_<level> macros below.
222222
// End-users shouldn't use these directly, instead use EP_LOG_<level>.
223223

224-
// Visual Studio prior to 2019 doens't correctly handle the constexpr
224+
// Visual Studio doens't correctly handle the constexpr
225225
// format string checking - see https://github.com/fmtlib/fmt/issues/2328.
226226
// As such, only apply the compile-time check for non-MSVC or VS 2019+
227-
#if FMT_MSC_VER && FMT_MSC_VER < 1920
227+
#if WIN32
228228
#define CHECK_FMT_STRING(fmt) fmt
229229
#else
230230
#define CHECK_FMT_STRING(fmt) FMT_STRING(fmt)

logger/logger.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ bool isInitialized();
143143

144144
} // namespace cb::logger
145145

146-
// Visual Studio prior to 2019 doesn't correctly handle the constexpr
146+
// Visual Studio doesn't correctly handle the constexpr
147147
// format string checking - see https://github.com/fmtlib/fmt/issues/2328.
148-
// As such, only apply the compile-time check for non-MSVC or VS 2019+
149-
#if FMT_MSC_VER && FMT_MSC_VER < 1920
148+
// As such, only apply the compile-time check for non-MSVC
149+
#ifdef WIN32
150150
#define CHECK_FMT_STRING(fmt) fmt
151151
#else
152152
#define CHECK_FMT_STRING(fmt) FMT_STRING(fmt)

0 commit comments

Comments
 (0)