Skip to content

Commit 7878b23

Browse files
committed
fix: a few changes for 32-bit compatibility
1 parent 14d854a commit 7878b23

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/compression/brotli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ class brotli_block_decompressor final : public block_decompressor_base {
668668
::BrotliDecoderGetErrorCode(decoder_.get()));
669669
}
670670

671-
size_t const uncompressed_size_;
671+
uint64_t const uncompressed_size_;
672672
uint8_t const* brotli_data_;
673673
size_t brotli_size_;
674674
std::unique_ptr<BrotliDecoderState, decltype(BrotliDecoderDestroyInstance)*>

src/compression/flac.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ class flac_block_decompressor final : public block_decompressor_base {
489489
return hdr;
490490
}
491491

492-
size_t const uncompressed_size_;
492+
uint64_t const uncompressed_size_;
493493
thrift::compression::flac_block_header const header_;
494494
std::unique_ptr<dwarfs_flac_stream_decoder> decoder_;
495495
};

src/compression/ricepp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class ricepp_block_decompressor final : public block_decompressor_base {
256256
return hdr;
257257
}
258258

259-
size_t const uncompressed_size_;
259+
uint64_t const uncompressed_size_;
260260
thrift::compression::ricepp_block_header const header_;
261261
std::span<uint8_t const> data_;
262262
std::unique_ptr<ricepp::decoder_interface<uint16_t>> decoder_;

test/block_cache_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ TEST_P(options_test, cache_stress) {
147147
auto iv = inodes[inode_dist(rng)];
148148
auto stat = fs.getattr(iv);
149149
if (stat.is_regular_file()) {
150-
auto offset = rng() % stat.size();
151-
auto size = rng() % (stat.size() - offset);
150+
size_t offset = rng() % stat.size();
151+
size_t size = rng() % (stat.size() - offset);
152152
reqs.push_back({iv, offset, size});
153153

154154
while (reqs.size() < num_read_reqs &&

0 commit comments

Comments
 (0)