Skip to content

Commit

Permalink
Minor fix for Windows build with zlib (facebook#9699)
Browse files Browse the repository at this point in the history
Summary:
```
conversion from 'size_t' to 'uLong', possible loss of data
```

Fix facebook#9688

Pull Request resolved: facebook#9699

Reviewed By: riversand963

Differential Revision: D34901116

Pulled By: jay-zhuang

fbshipit-source-id: 969148a7a8c023449bd85055a1f0eec71d0a9b3f
  • Loading branch information
jay-zhuang authored and facebook-github-bot committed Mar 17, 2022
1 parent 5894761 commit 2586585
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/compression.h
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,8 @@ inline bool Zlib_Compress(const CompressionInfo& info,
}

// Get an upper bound on the compressed size.
size_t upper_bound = deflateBound(&_stream, length);
size_t upper_bound =
deflateBound(&_stream, static_cast<unsigned long>(length));
output->resize(output_header_len + upper_bound);

// Compress the input, and put compressed data in output.
Expand Down

0 comments on commit 2586585

Please sign in to comment.