Skip to content

Commit 064a0fb

Browse files
committed
CBD-6348: [BP] Various fixes needed to build with C++20
Various small fixes needed to build in C++20 mode with the new MSVC compiler. Change-Id: Iad203ee3df7905f014f46f2e5254984e4fe678d8 Reviewed-on: https://review.couchbase.org/c/kv_engine/+/234993 Well-Formed: Restriction Checker Tested-by: Trond Norbye <[email protected]> Reviewed-by: Mohammad Zaeem <[email protected]>
1 parent 1568227 commit 064a0fb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

engines/ep/src/collections/kvstore.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void verifyFlatbuffersData(cb::const_byte_buffer buf,
3030
return;
3131
}
3232
throw std::runtime_error(fmt::format(
33-
"verifyFlatbuffersData:{} data invalid, ptr:{}, size:{:p}",
33+
"verifyFlatbuffersData:{} data invalid, ptr:{}, size:{}",
3434
caller,
3535
fmt::ptr(buf.data()),
3636
buf.size()));

engines/ep/src/kvstore/nexus-kvstore/nexus-kvstore.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3070,7 +3070,7 @@ GetValue NexusKVStore::getBySeqno(KVFileHandle& handle,
30703070
if (primaryGetValue.getStatus() == cb::engine_errc::success &&
30713071
!compareItem(*primaryGetValue.item, *secondaryGetValue.item)) {
30723072
auto msg = fmt::format(
3073-
"NexusKVStore::{}: {} seqno:{} item mismatch primary:{} "
3073+
"NexusKVStore::getBySeqno: {} seqno:{} item mismatch primary:{} "
30743074
"secondary:{}",
30753075
vbid,
30763076
seq,

engines/ep/src/mutation_log.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ MutationLog::~MutationLog() {
323323
}
324324

325325
void MutationLog::disable() {
326-
if (file >= 0) {
326+
if (file >= INVALID_FILE_VALUE) {
327327
close();
328328
disabled = true;
329329
}

programs/mctimings/mctimings.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ int main(int argc, char** argv) {
586586

587587
if (!file.empty()) {
588588
try {
589-
fmt::print(stdout, histogramInfo);
589+
fmt::print(stdout, "{}", histogramInfo);
590590
dumpHistogramFromFile(file);
591591
} catch (const std::exception& ex) {
592592
fmt::print(stderr, "{}\n", ex.what());
@@ -630,7 +630,7 @@ int main(int argc, char** argv) {
630630
}
631631

632632
if (verbose && !json) {
633-
fmt::print(stdout, histogramInfo);
633+
fmt::print(stdout, "{}", histogramInfo);
634634
}
635635

636636
if (buckets.empty()) {

0 commit comments

Comments
 (0)