diff options
| author | Stefan Boberg <[email protected]> | 2021-10-23 18:59:58 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-10-23 18:59:58 +0200 |
| commit | c63acd947853cc05721b327075ac78f91e58df8e (patch) | |
| tree | d209eec1ba7c22e21e55b571b435b3a605c4df48 /zenstore/filecas.cpp | |
| parent | compactcas: Changed CasDiskLocation implementation so it can store chunks > 4... (diff) | |
| download | zen-c63acd947853cc05721b327075ac78f91e58df8e.tar.xz zen-c63acd947853cc05721b327075ac78f91e58df8e.zip | |
cas: fixed some warnings
unsure why we don't get these when building in VS
Diffstat (limited to 'zenstore/filecas.cpp')
| -rw-r--r-- | zenstore/filecas.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/zenstore/filecas.cpp b/zenstore/filecas.cpp index 8c4df4029..0714637c6 100644 --- a/zenstore/filecas.cpp +++ b/zenstore/filecas.cpp @@ -90,7 +90,7 @@ FileCasStrategy::Initialize(bool IsNewStore) m_CasLog.Open(m_Config.RootDirectory / "cas.ulog", IsNewStore); - m_CasLog.Replay([&](const FileCasIndexEntry& Entry) {}); + m_CasLog.Replay([&](const FileCasIndexEntry& Entry) { ZEN_UNUSED(Entry); }); } CasStore::InsertResult @@ -364,6 +364,7 @@ FileCasStrategy::HaveChunk(const IoHash& ChunkHash) return false; } + void FileCasStrategy::DeleteChunk(const IoHash& ChunkHash, std::error_code& Ec) { @@ -399,7 +400,7 @@ void FileCasStrategy::IterateChunks(std::function<void(const IoHash& Hash, BasicFile& PayloadFile)>&& Callback) { ZEN_ASSERT(m_IsInitialized); - + struct Visitor : public FileSystemTraversal::TreeVisitor { Visitor(const std::filesystem::path& RootDir) : RootDirectory(RootDir) {} @@ -535,7 +536,10 @@ FileCasStrategy::CollectGarbage(GcContext& GcCtx) bool KeepThis = false; CandidateCas.clear(); CandidateCas.push_back(Hash); - GcCtx.FilterCas(CandidateCas, [&](const IoHash& Hash) { KeepThis = true; }); + GcCtx.FilterCas(CandidateCas, [&](const IoHash& Hash) { + ZEN_UNUSED(Hash); + KeepThis = true; + }); const uint64_t FileSize = Payload.FileSize(); @@ -566,7 +570,7 @@ FileCasStrategy::CollectGarbage(GcContext& GcCtx) if (Ec) { ZEN_WARN("failed to delete file for chunk {}: '{}'", Hash, Ec.message()); - } + } } } @@ -587,7 +591,7 @@ TEST_CASE("cas.file.move") CasConfig.RootDirectory = TempDir.Path() / "cas"; FileCasStrategy FileCas(CasConfig, Gc); - FileCas.Initialize(/* IsNewStore */true); + FileCas.Initialize(/* IsNewStore */ true); { std::filesystem::path Payload1Path{TempDir.Path() / "payload_1"}; |