diff options
| author | Stefan Boberg <[email protected]> | 2025-10-28 22:34:52 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-10-28 22:34:52 +0100 |
| commit | 9c2cdc2345880f18b67af6b7b5c11d0ce9041ced (patch) | |
| tree | dc868fb7368df37e7c3645f4cadea8bf73303505 /src/zenstore/filecas.cpp | |
| parent | 5.7.7 (diff) | |
| download | zen-9c2cdc2345880f18b67af6b7b5c11d0ce9041ced.tar.xz zen-9c2cdc2345880f18b67af6b7b5c11d0ce9041ced.zip | |
fix --zentrace=no compile errors (#616)
* make sure the correct `UE_WITH_TRACE` conditional is used to enable/disable support code as appropriate
* fixed some accidental `int32`, `int64` et al usage, due to typedefs leaking through from trace header
with this fix, it is now possible to build with `--zentrace=no` again
Diffstat (limited to 'src/zenstore/filecas.cpp')
| -rw-r--r-- | src/zenstore/filecas.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/zenstore/filecas.cpp b/src/zenstore/filecas.cpp index 13437369f..a895b81e0 100644 --- a/src/zenstore/filecas.cpp +++ b/src/zenstore/filecas.cpp @@ -261,7 +261,7 @@ FileCasStrategy::UpdateIndex(const IoHash& ChunkHash, uint64_t ChunkSize) { ZEN_MEMSCOPE(GetFileCasTag()); - uint64 OldChunkSize = 0; + uint64_t OldChunkSize = 0; { RwLock::ExclusiveLockScope _(m_Lock); if (auto It = m_Index.find(ChunkHash); It != m_Index.end()) @@ -347,7 +347,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash, CasStore:: // We moved the file, make sure the index reflects that { - uint64 OldChunkSize = (uint64)-1; + uint64_t OldChunkSize = (uint64_t)-1; { RwLock::ExclusiveLockScope _(m_Lock); if (auto It = m_Index.find(ChunkHash); It != m_Index.end()) @@ -356,7 +356,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash, CasStore:: m_Index.erase(It); } } - if (OldChunkSize != (uint64)-1) + if (OldChunkSize != (uint64_t)-1) { m_CasLog.Append({.Key = ChunkHash, .Flags = FileCasIndexEntry::kTombStone, .Size = OldChunkSize}); m_TotalSize.fetch_sub(OldChunkSize, std::memory_order::relaxed); @@ -429,7 +429,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash, CasStore:: } } const char* ChunkPath = nullptr; - uint64 ChunkSize = 0; + uint64_t ChunkSize = 0; int Fd; } PayloadFile = {.ChunkPath = ChunkPath.c_str(), .ChunkSize = ChunkSize, .Fd = Fd}; @@ -461,21 +461,21 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash, CasStore:: } IoBuffer -FileCasStrategy::SafeOpenChunk(const IoHash& ChunkHash, uint64 ExpectedSize) +FileCasStrategy::SafeOpenChunk(const IoHash& ChunkHash, uint64_t ExpectedSize) { ShardingHelper Name(m_RootDirectory, ChunkHash); const std::filesystem::path ChunkPath = Name.ShardedPath.ToPath(); RwLock::SharedLockScope ShardLock(LockForHash(ChunkHash)); if (IoBuffer Chunk = IoBufferBuilder::MakeFromFile(ChunkPath); Chunk) { - uint64 ChunkSize = Chunk.GetSize(); + uint64_t ChunkSize = Chunk.GetSize(); if (ChunkSize == ExpectedSize) { return Chunk; } - IoHash RawHash; - uint64 RawSize; + IoHash RawHash; + uint64_t RawSize; if (CompressedBuffer Compressed = CompressedBuffer::FromCompressed(SharedBuffer(Chunk), RawHash, RawSize); Compressed) { if (Compressed.GetCompressedSize() == ChunkSize) |