diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-08-21T13·20+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-08-21T13·20+0200 |
commit | 6317c65937ad7d9c5a954c4dfc48de259e55f4f3 (patch) | |
tree | 656dcca2e3142971b57a1040b8ce36a7a01f428d /src | |
parent | 17a92dfb7d87499d7aed5d3b0504d4c724db18a3 (diff) |
Fix warnings in compression.cc
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/compression.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/libutil/compression.cc b/src/libutil/compression.cc index 53b62f62a76f..204c63cd26fc 100644 --- a/src/libutil/compression.cc +++ b/src/libutil/compression.cc @@ -15,12 +15,10 @@ namespace nix { -static const size_t bufSize = 32 * 1024; - // Don't feed brotli too much at once. struct ChunkedCompressionSink : CompressionSink { - uint8_t outbuf[BUFSIZ]; + uint8_t outbuf[32 * 1024]; void write(const unsigned char * data, size_t len) override { @@ -124,7 +122,7 @@ struct BzipDecompressionSink : ChunkedCompressionSink write(nullptr, 0); } - void writeInternal(const unsigned char * data, size_t len) + void writeInternal(const unsigned char * data, size_t len) override { assert(len <= std::numeric_limits<decltype(strm.avail_in)>::max()); @@ -173,7 +171,7 @@ struct BrotliDecompressionSink : ChunkedCompressionSink writeInternal(nullptr, 0); } - void writeInternal(const unsigned char * data, size_t len) + void writeInternal(const unsigned char * data, size_t len) override { const uint8_t * next_in = data; size_t avail_in = len; @@ -330,7 +328,7 @@ struct BzipCompressionSink : ChunkedCompressionSink writeInternal(nullptr, 0); } - void writeInternal(const unsigned char * data, size_t len) + void writeInternal(const unsigned char * data, size_t len) override { assert(len <= std::numeric_limits<decltype(strm.avail_in)>::max()); @@ -380,7 +378,7 @@ struct BrotliCompressionSink : ChunkedCompressionSink writeInternal(nullptr, 0); } - void writeInternal(const unsigned char * data, size_t len) + void writeInternal(const unsigned char * data, size_t len) override { const uint8_t * next_in = data; size_t avail_in = len; |