From f1c14307d3723c6dbfce1a3bed4b5d2156e85391 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Tue, 13 Oct 2026 07:01:32 +0000 Subject: [PATCH 1/2] fix: clean compiler warnings without redundant initialization --- app/lavik.cpp | 11 +++-- bycorf | 2 +- include/lavik/storage/detail/grouped/hash.h | 2 +- include/lavik/storage/engine.h | 12 +++--- src/config.cpp | 5 ++- src/redis/backup.cpp | 2 +- src/redis/command.cpp | 3 +- src/redis/rdb_record_spool.h | 2 +- src/redis/sort_command.h | 6 +-- src/redis/stream_command.cpp | 19 +++++---- src/redis/string_command.cpp | 46 +++++++++++++++------ src/redis/zset_command.cpp | 17 +++++--- src/replication/redis_export.cpp | 2 +- src/storage/engine/compact_api.cpp | 3 +- src/storage/engine/grouped/list.cpp | 3 +- src/storage/engine/grouped/stream.cpp | 5 ++- src/storage/engine/grouped/zset.cpp | 43 ++++++++++++------- src/storage/engine/recovery.cpp | 27 ++++++++---- tests/containers/cow_array_test.cpp | 2 +- tests/meta_journal_test.cpp | 8 ++-- 20 files changed, 143 insertions(+), 77 deletions(-) diff --git a/app/lavik.cpp b/app/lavik.cpp index f413b0684..ed58ba7f9 100644 --- a/app/lavik.cpp +++ b/app/lavik.cpp @@ -391,11 +391,14 @@ int main(int argc, char** argv) { constexpr std::size_t kMiB = 1024 * 1024; constexpr std::size_t kKiB = 1024; - if (registered_buffer_mb > std::numeric_limits::max() / kMiB || - replication_publish_queue_mb > + if (static_cast(registered_buffer_mb) > std::numeric_limits::max() / kMiB || - storage_read_buffer_kb > std::numeric_limits::max() / kKiB || - flush_size_kb > std::numeric_limits::max() / kKiB) { + static_cast(replication_publish_queue_mb) > + std::numeric_limits::max() / kMiB || + static_cast(storage_read_buffer_kb) > + std::numeric_limits::max() / kKiB || + static_cast(flush_size_kb) > + std::numeric_limits::max() / kKiB) { return 2; } options.registered_buffer_bytes_ = diff --git a/bycorf b/bycorf index 7904686b9..5687c190d 160000 --- a/bycorf +++ b/bycorf @@ -1 +1 @@ -Subproject commit 7904686b97ca107b4adaee1982f13742995a3430 +Subproject commit 5687c190d8b895ba541928b031aad42bed4c21c3 diff --git a/include/lavik/storage/detail/grouped/hash.h b/include/lavik/storage/detail/grouped/hash.h index 9b47b04e5..071b5dc65 100644 --- a/include/lavik/storage/detail/grouped/hash.h +++ b/include/lavik/storage/detail/grouped/hash.h @@ -125,7 +125,7 @@ struct HashGroupSnapshot { bool retired_ = false; HashValue value_; // Mutually exclusive with value_; the encoder checks this invariant. - std::optional prepared_; + std::optional prepared_ = std::nullopt; std::size_t field_count() const noexcept { return prepared_ ? prepared_->count() : value_.entries_.size(); } diff --git a/include/lavik/storage/engine.h b/include/lavik/storage/engine.h index 2ef8142ed..300fd18d6 100644 --- a/include/lavik/storage/engine.h +++ b/include/lavik/storage/engine.h @@ -890,7 +890,7 @@ struct StreamTrimRequest { struct StreamTrimResult { std::uint64_t removed_ = 0; std::uint64_t length_ = 0; - std::optional> first_id_; + std::optional> first_id_ = std::nullopt; }; struct CompactValueUpdate { @@ -903,6 +903,8 @@ struct CompactValueUpdate { std::uint64_t logical_size_ = 0; // nullopt preserves the current deadline (or persistence for a new key). std::optional expire_at_ms_; + // Non-Stream aggregate callers explicitly use {} for the Stream-only state. + // GCC 13 emits redundant stores with default member initializers here. std::optional stream_trim_; // Called once after planning, before publication, to canonicalize replication // and the reply from the exact boundary. It must not access storage; @@ -924,7 +926,7 @@ struct StreamRangeAccess { bool reverse_ = false; // Pinned reply sources may select sorted, unique IDs known to exist under // the caller's intent. Empty means an ordinary contiguous ID range. - std::vector> selected_ids_; + std::vector> selected_ids_{}; }; // A writable callback sees only the named messages and may remove them. Storage @@ -943,7 +945,7 @@ struct StreamAckAccess { // additionally load the corresponding messages; deleted messages stay absent. struct StreamPendingAccess { StreamRangeAccess range_; - std::optional consumer_; + std::optional consumer_ = std::nullopt; std::uint64_t min_idle_ms_ = 0; std::uint64_t now_ms_ = 0; bool load_entries_ = false; @@ -958,13 +960,13 @@ struct StreamGroupAccess { std::vector> pending_ids_{}; std::vector> entry_ids_{}; std::optional read_new_count_ = std::nullopt; - std::optional pending_scan_; + std::optional pending_scan_ = std::nullopt; // Delivery callbacks need IDs/counters, while replies read immutable fields // through a pinned range source after publication under the same key intent. bool entry_ids_only_ = false; bool create_ = false; bool destroy_ = false; - std::optional remove_consumer_; + std::optional remove_consumer_ = std::nullopt; }; struct StreamInspectAccess { diff --git a/src/config.cpp b/src/config.cpp index 1bf8c8895..11e013641 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -806,8 +806,9 @@ absl::Status ValidateServerOptions(const ServerOptions& options) { "storage-read-buffer-kb must be a 4 KiB multiple greater than 8 KiB " "and fit the 32-bit slot size"); } - if (options.shard_count_ > std::numeric_limits::max() / - storage::kStorageBlockBytes || + if (static_cast(options.shard_count_) > + std::numeric_limits::max() / + storage::kStorageBlockBytes || options.replication_options_.backlog_size_bytes_ < static_cast(options.shard_count_) * storage::kStorageBlockBytes) { diff --git a/src/redis/backup.cpp b/src/redis/backup.cpp index 6414a5544..9978af428 100644 --- a/src/redis/backup.cpp +++ b/src/redis/backup.cpp @@ -84,7 +84,7 @@ class RdbOutputQueue { return true; } - void EndEntry(unsigned owner) { + void EndEntry([[maybe_unused]] unsigned owner) { std::lock_guard lock(mutex_); assert(entry_owner_ == owner); entry_owner_ = UINT_MAX; diff --git a/src/redis/command.cpp b/src/redis/command.cpp index 7e328378f..51bfffe8d 100644 --- a/src/redis/command.cpp +++ b/src/redis/command.cpp @@ -6580,8 +6580,7 @@ Task ExecuteExecSequentialSort( std::vector sort_keys; sort_keys.reserve(keys.size()); for (const ExecKey& key : keys) { - sort_keys.push_back(SortExecKey{ - .digest_ = key.digest_, .owner_ = key.owner_, .arg_ = key.arg_}); + sort_keys.push_back(SortExecKey{.arg_ = key.arg_}); } co_return co_await ExecuteSortCommandLocked(command, sort_keys, tx_writes, deterministic_set_order); diff --git a/src/redis/rdb_record_spool.h b/src/redis/rdb_record_spool.h index 31575ceec..63da371dc 100644 --- a/src/redis/rdb_record_spool.h +++ b/src/redis/rdb_record_spool.h @@ -41,7 +41,7 @@ class RecordSpool { public: struct Record { std::optional reservation_; - std::string key_, value_; + std::string key_{}, value_{}; }; absl::Status Add(std::string_view key, std::string_view value) { if (finished_) diff --git a/src/redis/sort_command.h b/src/redis/sort_command.h index f1df7a7d0..3612f11ed 100644 --- a/src/redis/sort_command.h +++ b/src/redis/sort_command.h @@ -25,10 +25,10 @@ namespace lavik { class ReplyBuilder; struct SortExecKey { - storage::Digest digest_; - std::uint16_t owner_ = 0; + // EXEC supplies a command argument; scripts supply a declared key name. + // The SORT adapter derives the digest and owner from that selected name. std::uint16_t arg_ = 0; - std::string_view name_; + std::string_view name_{}; }; void InitSortCommandStorage(storage::StorageEngine* engine); diff --git a/src/redis/stream_command.cpp b/src/redis/stream_command.cpp index 3965a1cf6..686628497 100644 --- a/src/redis/stream_command.cpp +++ b/src/redis/stream_command.cpp @@ -83,7 +83,7 @@ struct Group { std::int64_t entries_read_ = -1; std::vector consumers_; std::vector pending_; - std::optional summary_; + std::optional summary_ = std::nullopt; }; struct Stream { @@ -781,10 +781,15 @@ storage::CompactValueUpdate NoChange() { return {}; } absl::StatusOr Changed(Stream stream) { auto encoded = Encode(stream); if (!encoded.ok()) return encoded.status(); - return storage::CompactValueUpdate{.changed_ = true, - .encoded_ = std::move(*encoded), - .logical_size_ = stream.entries_.size(), - .expire_at_ms_ = std::nullopt}; + return storage::CompactValueUpdate{ + .changed_ = true, + .encoded_ = std::move(*encoded), + .logical_size_ = stream.entries_.size(), + .expire_at_ms_ = std::nullopt, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, + }; } Group* FindGroup(Stream* stream, std::string_view name) { @@ -1378,9 +1383,9 @@ struct ReadOneResult { Id id_; std::optional entry_; }; - std::vector entries_; + std::vector entries_{}; Id cursor_; - std::shared_ptr stream_; + std::shared_ptr stream_{}; }; Task> ReadOneLocal( diff --git a/src/redis/string_command.cpp b/src/redis/string_command.cpp index c30db0920..10edf28bb 100644 --- a/src/redis/string_command.cpp +++ b/src/redis/string_command.cpp @@ -637,6 +637,9 @@ bycorf::Task RunBitmapLocked( .encoded_ = std::move(next), .logical_size_ = logical_size, .expire_at_ms_ = std::nullopt, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, }; }; @@ -805,19 +808,27 @@ bycorf::Task RunStringLocked( .encoded_ = std::move(encoded), .logical_size_ = size, .expire_at_ms_ = expire_at, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, }; }; if (request.kind_ == CommandKind::kGetDel) { reply = exists ? EncodeBulkString(old) : EncodeSemanticNull(request.resp_version_); - if (exists) captured_args = {"DEL", args[1]}; - return exists ? storage::CompactValueUpdate{.changed_ = true, - .erase_ = true, - .encoded_ = {}, - .logical_size_ = 0, - .expire_at_ms_ = std::nullopt} - : storage::CompactValueUpdate{}; + if (!exists) return storage::CompactValueUpdate{}; + captured_args = {"DEL", args[1]}; + return storage::CompactValueUpdate{ + .changed_ = true, + .erase_ = true, + .encoded_ = {}, + .logical_size_ = 0, + .expire_at_ms_ = std::nullopt, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, + }; } if (request.kind_ == CommandKind::kGetEx) { @@ -836,6 +847,9 @@ bycorf::Task RunStringLocked( .encoded_ = {}, .logical_size_ = old.size(), .expire_at_ms_ = 0, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, }; } const bool ex = RedisEqualsIgnoreCase(args[2], "ex"); @@ -849,11 +863,16 @@ bycorf::Task RunStringLocked( captured_args = {"PEXPIREAT", args[1], std::to_string(*getex_deadline)}; if (replication.has_value()) replication->args_ = captured_args; if (*getex_deadline <= RedisUnixTimeMillis()) { - return storage::CompactValueUpdate{.changed_ = true, - .erase_ = true, - .encoded_ = {}, - .logical_size_ = 0, - .expire_at_ms_ = std::nullopt}; + return storage::CompactValueUpdate{ + .changed_ = true, + .erase_ = true, + .encoded_ = {}, + .logical_size_ = 0, + .expire_at_ms_ = std::nullopt, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, + }; } return storage::CompactValueUpdate{ .changed_ = true, @@ -861,6 +880,9 @@ bycorf::Task RunStringLocked( .encoded_ = {}, .logical_size_ = old.size(), .expire_at_ms_ = *getex_deadline, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, }; } diff --git a/src/redis/zset_command.cpp b/src/redis/zset_command.cpp index d98c36bca..3ddb7cb77 100644 --- a/src/redis/zset_command.cpp +++ b/src/redis/zset_command.cpp @@ -771,7 +771,7 @@ std::uint64_t Interleave26(std::uint32_t lon, std::uint32_t lat) { std::uint64_t GeoScore(double lon, double lat) { constexpr double scale = static_cast(std::uint64_t{1} << 26); - auto normalized = [scale](double value, double minimum, double maximum) { + auto normalized = [](double value, double minimum, double maximum) { double n = (value - minimum) / (maximum - minimum); n = std::clamp(n, 0.0, std::nextafter(1.0, 0.0)); return static_cast(n * scale); @@ -796,7 +796,7 @@ std::pair GeoDecode(std::uint64_t hash) { std::string GeoHashString(double lon, double lat) { static constexpr char alphabet[] = "0123456789bcdefghjkmnpqrstuvwxyz"; constexpr double scale = static_cast(std::uint64_t{1} << 26); - auto normalized = [scale](double value, double minimum, double maximum) { + auto normalized = [](double value, double minimum, double maximum) { double n = (value - minimum) / (maximum - minimum); n = std::clamp(n, 0.0, std::nextafter(1.0, 0.0)); return static_cast(n * scale); @@ -2299,10 +2299,15 @@ Task ReplaceMultiDestination( return absl::InternalError( "sorted-set STORE destination was not replaced"); } - return storage::CompactValueUpdate{.changed_ = true, - .encoded_ = std::move(*encoded), - .logical_size_ = context->output_.size(), - .expire_at_ms_ = std::nullopt}; + return storage::CompactValueUpdate{ + .changed_ = true, + .encoded_ = std::move(*encoded), + .logical_size_ = context->output_.size(), + .expire_at_ms_ = std::nullopt, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, + }; }; co_return co_await g_storage->ExecuteCompactLocked( request.db_id_, destination, digest, storage::ValueType::kSortedSet, diff --git a/src/replication/redis_export.cpp b/src/replication/redis_export.cpp index ab6cdfddb..d04a3c286 100644 --- a/src/replication/redis_export.cpp +++ b/src/replication/redis_export.cpp @@ -131,7 +131,7 @@ class RedisRdbStreamQueue available, owner, std::memory_order_acquire, std::memory_order_relaxed); } - bool TryPush(std::string* fragment, unsigned owner) { + bool TryPush(std::string* fragment, [[maybe_unused]] unsigned owner) { assert(entry_owner_.load(std::memory_order_relaxed) == owner); if (aborted_.load(std::memory_order_relaxed)) return false; const std::size_t bytes = fragment->size(); diff --git a/src/storage/engine/compact_api.cpp b/src/storage/engine/compact_api.cpp index 1327f447a..49e8beed0 100644 --- a/src/storage/engine/compact_api.cpp +++ b/src/storage/engine/compact_api.cpp @@ -491,7 +491,8 @@ Task StorageEngine::Impl::ExecuteCompactLocked( // Preserve explicit identical-value/metadata mutation semantics from // the callback. A single page suffices; EXPIRE/PERSIST themselves use // the separate root-only metadata path. - const auto& first = directory.groups().front(); + const auto groups = directory.groups(); + const auto& first = groups.front(); OrderedGroupSnapshot page{.kind_ = directory.root().kind_, .incarnation_ = directory.root().incarnation_, .id_ = first.id_, diff --git a/src/storage/engine/grouped/list.cpp b/src/storage/engine/grouped/list.cpp index b036cbae4..d5fd36357 100644 --- a/src/storage/engine/grouped/list.cpp +++ b/src/storage/engine/grouped/list.cpp @@ -423,6 +423,7 @@ Task> StorageEngine::Impl::ExecuteGroupedListLocked( store, partition, db_id, key, digest, object, directory.groups()[begin_page].id_, offset, remaining)); } else { + const auto groups = directory.groups(); for (std::size_t i = begin_page; i < end_page;) { ListReadBatch batch(store.worker_); for (std::size_t j = 0; j < ListReadBatch::kWidth && i + j < end_page; @@ -435,7 +436,7 @@ Task> StorageEngine::Impl::ExecuteGroupedListLocked( "OOM grouped List read batch admission"); break; } - const auto& route = directory.groups()[i + j]; + const auto& route = groups[i + j]; const auto take = std::min(remaining, route.item_count_ - offset); batch.Add(LoadOrderedListRange(store, partition, db_id, key, digest, diff --git a/src/storage/engine/grouped/stream.cpp b/src/storage/engine/grouped/stream.cpp index 4b87531df..003819063 100644 --- a/src/storage/engine/grouped/stream.cpp +++ b/src/storage/engine/grouped/stream.cpp @@ -913,7 +913,10 @@ Task StorageEngine::Impl::ExecuteGroupedStreamInspect( if (!status.ok()) co_return status; std::string group_header(*value); StreamGroupSummary summary{.name_ = name, - .consumers_ = Count(*value, value->size() - 4)}; + .consumers_ = Count(*value, value->size() - 4), + .first_pending_ = {}, + .last_pending_ = {}, + .consumer_pending_ = {}}; auto count = co_await cache.Required(prefix + '\2'); if (!count.ok()) co_return count.status(); auto count_value = StreamRecordPayload(*count); diff --git a/src/storage/engine/grouped/zset.cpp b/src/storage/engine/grouped/zset.cpp index cd5a572df..0a438542d 100644 --- a/src/storage/engine/grouped/zset.cpp +++ b/src/storage/engine/grouped/zset.cpp @@ -556,7 +556,7 @@ absl::StatusOr ApplyCompactSortedSet( auto status = selection.Prepare(entries.size(), operation.count_, true, &result); if (!status.ok()) return status; - for (const auto [rank, slot] : selection.draws_) { + for (const auto& [rank, slot] : selection.draws_) { auto copied = CopyOutput(entries[rank]); if (!copied.ok()) return copied.status(); result.members_[slot] = std::move(*copied); @@ -583,10 +583,15 @@ absl::StatusOr ApplyCompactSortedSet( auto encoded = EncodeOrderedCompactValue(OrderedCollectionKind::kSortedSet, entries); if (!encoded.ok()) return encoded.status(); - return CompactValueUpdate{.changed_ = true, - .encoded_ = std::move(*encoded), - .logical_size_ = entries.size(), - .expire_at_ms_ = std::nullopt}; + return CompactValueUpdate{ + .changed_ = true, + .encoded_ = std::move(*encoded), + .logical_size_ = entries.size(), + .expire_at_ms_ = std::nullopt, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, + }; } if (operation.kind_ == SortedSetOperationKind::kPop) { const auto count = @@ -613,10 +618,15 @@ absl::StatusOr ApplyCompactSortedSet( auto encoded = EncodeOrderedCompactValue(OrderedCollectionKind::kSortedSet, entries); if (!encoded.ok()) return encoded.status(); - return CompactValueUpdate{.changed_ = true, - .encoded_ = std::move(*encoded), - .logical_size_ = entries.size(), - .expire_at_ms_ = std::nullopt}; + return CompactValueUpdate{ + .changed_ = true, + .encoded_ = std::move(*encoded), + .logical_size_ = entries.size(), + .expire_at_ms_ = std::nullopt, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, + }; } if (ScanRead(operation)) { auto read = ReadCompact(entries, operation, &result); @@ -651,10 +661,15 @@ absl::StatusOr ApplyCompactSortedSet( auto encoded = EncodeOrderedCompactValue(OrderedCollectionKind::kSortedSet, entries); if (!encoded.ok()) return encoded.status(); - return CompactValueUpdate{.changed_ = true, - .encoded_ = std::move(*encoded), - .logical_size_ = entries.size(), - .expire_at_ms_ = std::nullopt}; + return CompactValueUpdate{ + .changed_ = true, + .encoded_ = std::move(*encoded), + .logical_size_ = entries.size(), + .expire_at_ms_ = std::nullopt, + .stream_trim_ = {}, + .stream_trim_complete_ = {}, + .stream_pending_removed_ = {}, + }; } } // namespace @@ -1416,7 +1431,7 @@ StorageEngine::Impl::ExecuteGroupedSortedSetLocked( auto admission = budget.Reserve(4); if (!admission.ok()) co_return admission.status(); working_admission.emplace(std::move(*admission)); - auto check_plan_read = [&](std::size_t i) -> absl::Status { + auto check_plan_read = [&]([[maybe_unused]] std::size_t i) -> absl::Status { LAVIK_FAULT_INJECT( if (LAVIK_FAULT_MATCHES("LAVIK_FAIL_ZSET_PLAN_READ_KEY", key) && LAVIK_FAULT_MATCHES_NTH("LAVIK_FAIL_ZSET_PLAN_READ_KEY", key, diff --git a/src/storage/engine/recovery.cpp b/src/storage/engine/recovery.cpp index 49f666169..6d1e5b45b 100644 --- a/src/storage/engine/recovery.cpp +++ b/src/storage/engine/recovery.cpp @@ -794,22 +794,31 @@ Task StorageEngine::Impl::ScanAssignedBlocks( co_return absl::DataLossError( "ordered page disagrees with its record identity"); } - ordered_group = RecoveryOrderedMetadata{ - .previous_ = decoded->previous_, - .next_ = decoded->next_, - }; + // Initialize only the active metadata alternative; Stream pages + // never read score bounds, and live score bounds are known now. if (ordered_kind == OrderedCollectionKind::kStream) { - std::construct_at(&ordered_group->stream_max_key_); + ordered_group = RecoveryOrderedMetadata{ + .previous_ = decoded->previous_, + .next_ = decoded->next_, + .stream_max_key_ = {}, + }; if (!decoded->retired_) { auto max_key = StreamRecordKey(decoded->entries_.back().value_); if (!max_key.ok()) co_return max_key.status(); ordered_group->stream_max_key_.Set(*max_key); } - } else if (!decoded->entries_.empty()) { - ordered_group->scores_ = { - .min_ = decoded->entries_.front().score_, - .max_ = decoded->entries_.back().score_}; + } else { + ordered_group = RecoveryOrderedMetadata{ + .previous_ = decoded->previous_, + .next_ = decoded->next_, + .scores_ = {.min_ = decoded->entries_.empty() + ? 0 + : decoded->entries_.front().score_, + .max_ = decoded->entries_.empty() + ? 0 + : decoded->entries_.back().score_}, + }; } } else { auto decoded = DecodeHashGroup(encoded); diff --git a/tests/containers/cow_array_test.cpp b/tests/containers/cow_array_test.cpp index bfbdf9e18..56b76bc48 100644 --- a/tests/containers/cow_array_test.cpp +++ b/tests/containers/cow_array_test.cpp @@ -108,7 +108,7 @@ TEST(CowArrayTest, EXPECT_EQ(appended->size(), 3); const auto before = WorkerMemoryAccountingBytes(0); CountedArrayValue::throw_after = 1; - EXPECT_THROW(current->Appended(values), std::runtime_error); + EXPECT_THROW((void)current->Appended(values), std::runtime_error); CountedArrayValue::throw_after = -1; EXPECT_EQ(WorkerMemoryAccountingBytes(0), before); EXPECT_EQ(current->front().value_, 11); diff --git a/tests/meta_journal_test.cpp b/tests/meta_journal_test.cpp index 008c3419d..3836fdd82 100644 --- a/tests/meta_journal_test.cpp +++ b/tests/meta_journal_test.cpp @@ -114,7 +114,7 @@ TEST(MetaAuditStore, SameIndexDifferentContentFailsStop) { ASSERT_TRUE(store.Append(MakeAuditRecord(1)).ok()); // The same raft log index carrying different content means the apply layer // lost the index/record correspondence: an implementation bug, fail-stop. - EXPECT_DEATH(store.Append(MakeAuditRecord(1, "SetSlotMap(...)")), ""); + EXPECT_DEATH((void)store.Append(MakeAuditRecord(1, "SetSlotMap(...)")), ""); } TEST(MetaAuditStore, OutOfOrderNewIndexFailsStop) { @@ -122,7 +122,7 @@ TEST(MetaAuditStore, OutOfOrderNewIndexFailsStop) { ASSERT_TRUE(store.Append(MakeAuditRecord(5)).ok()); // A NEW record below the window's newest index: apply is ordered by log // index, so this is an implementation bug, fail-stop. - EXPECT_DEATH(store.Append(MakeAuditRecord(3)), ""); + EXPECT_DEATH((void)store.Append(MakeAuditRecord(3)), ""); } TEST(MetaAuditStore, RejectsOverCapFields) { @@ -158,7 +158,7 @@ TEST(MetaAuditStore, StrictExportFullWindowFailsStopIfGateIsBypassed) { ASSERT_TRUE(store.Append(MakeAuditRecord(1)).ok()); ASSERT_TRUE(store.Append(MakeAuditRecord(2)).ok()); EXPECT_TRUE(store.NeedsExport()); - EXPECT_DEATH(store.Append(MakeAuditRecord(3)), ""); + EXPECT_DEATH((void)store.Append(MakeAuditRecord(3)), ""); } TEST(MetaAuditStore, DisabledSuppressesOrdinaryRecordsButForcedRecordRemains) { @@ -255,7 +255,7 @@ TEST(MetaAuditStore, AppendAtOrBelowPrunedFloorFailsStop) { // Re-applying a pruned index means replay below the snapshot boundary: an // implementation bug, fail-stop (the prune is committed state, so a correct // recovery never revisits these indexes). - EXPECT_DEATH(store.Append(MakeAuditRecord(1)), ""); + EXPECT_DEATH((void)store.Append(MakeAuditRecord(1)), ""); } TEST(MetaAuditStore, SerializationRoundTripPreservesWindow) { From b965d6fbdfffdde3873759d4101887d762a61d5d Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Tue, 13 Oct 2026 07:10:57 +0000 Subject: [PATCH 2/2] chore: pin merged Bycorf warning fix --- bycorf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bycorf b/bycorf index 5687c190d..8caaf75cb 160000 --- a/bycorf +++ b/bycorf @@ -1 +1 @@ -Subproject commit 5687c190d8b895ba541928b031aad42bed4c21c3 +Subproject commit 8caaf75cb131b591922af51a19861f92e2ffc893