diff options
author | Kane York <kanepyork@gmail.com> | 2020-08-01T22·32-0700 |
---|---|---|
committer | kanepyork <rikingcoding@gmail.com> | 2020-08-01T22·45+0000 |
commit | 72fc2fd27e8ca9ddd6dad7f1c8f508e115aa2b60 (patch) | |
tree | eacd58ae5e0de9ffaadc265b8fd417f2f62d0433 /third_party/nix/src/libutil/compression.cc | |
parent | cc3c45f739133162c840d500c0d633f46a524e06 (diff) |
fix(3p/nix): revert "apply all clang-tidy fixes" r/1534
This reverts commit ef54f5da9fa30b5c302f2a49595ee5d041f9706a. Resolved conflicts: third_party/nix/src/libexpr/eval.cc third_party/nix/src/libstore/builtins/fetchurl.cc third_party/nix/src/libstore/references.cc third_party/nix/src/libutil/hash.cc third_party/nix/src/nix-daemon/nix-daemon.cc Change-Id: Ib9cf6e96a79a23bde3983579ced3f92e530cb011 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1547 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
Diffstat (limited to 'third_party/nix/src/libutil/compression.cc')
-rw-r--r-- | third_party/nix/src/libutil/compression.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/third_party/nix/src/libutil/compression.cc b/third_party/nix/src/libutil/compression.cc index b598927c88f7..779d326eb204 100644 --- a/third_party/nix/src/libutil/compression.cc +++ b/third_party/nix/src/libutil/compression.cc @@ -17,7 +17,7 @@ namespace nix { // Don't feed brotli too much at once. struct ChunkedCompressionSink : CompressionSink { - uint8_t outbuf[32 * 1024]{}; + uint8_t outbuf[32 * 1024]; void write(const unsigned char* data, size_t len) override { const size_t CHUNK_SIZE = sizeof(outbuf) << 2; @@ -43,7 +43,7 @@ struct NoneSink : CompressionSink { struct XzDecompressionSink : CompressionSink { Sink& nextSink; - uint8_t outbuf[BUFSIZ]{}; + uint8_t outbuf[BUFSIZ]; lzma_stream strm = LZMA_STREAM_INIT; bool finished = false; @@ -89,7 +89,7 @@ struct XzDecompressionSink : CompressionSink { struct BzipDecompressionSink : ChunkedCompressionSink { Sink& nextSink; - bz_stream strm{}; + bz_stream strm; bool finished = false; explicit BzipDecompressionSink(Sink& nextSink) : nextSink(nextSink) { @@ -99,7 +99,7 @@ struct BzipDecompressionSink : ChunkedCompressionSink { throw CompressionError("unable to initialise bzip2 decoder"); } - strm.next_out = reinterpret_cast<char*>(outbuf); + strm.next_out = (char*)outbuf; strm.avail_out = sizeof(outbuf); } @@ -128,7 +128,7 @@ struct BzipDecompressionSink : ChunkedCompressionSink { if (strm.avail_out < sizeof(outbuf) || strm.avail_in == 0) { nextSink(outbuf, sizeof(outbuf) - strm.avail_out); - strm.next_out = reinterpret_cast<char*>(outbuf); + strm.next_out = (char*)outbuf; strm.avail_out = sizeof(outbuf); } } @@ -205,12 +205,12 @@ ref<CompressionSink> makeDecompressionSink(const std::string& method, struct XzCompressionSink : CompressionSink { Sink& nextSink; - uint8_t outbuf[BUFSIZ]{}; + uint8_t outbuf[BUFSIZ]; lzma_stream strm = LZMA_STREAM_INIT; bool finished = false; XzCompressionSink(Sink& nextSink, bool parallel) : nextSink(nextSink) { - lzma_ret ret{}; + lzma_ret ret; bool done = false; if (parallel) { @@ -277,7 +277,7 @@ struct XzCompressionSink : CompressionSink { struct BzipCompressionSink : ChunkedCompressionSink { Sink& nextSink; - bz_stream strm{}; + bz_stream strm; bool finished = false; explicit BzipCompressionSink(Sink& nextSink) : nextSink(nextSink) { @@ -287,7 +287,7 @@ struct BzipCompressionSink : ChunkedCompressionSink { throw CompressionError("unable to initialise bzip2 encoder"); } - strm.next_out = reinterpret_cast<char*>(outbuf); + strm.next_out = (char*)outbuf; strm.avail_out = sizeof(outbuf); } @@ -316,7 +316,7 @@ struct BzipCompressionSink : ChunkedCompressionSink { if (strm.avail_out < sizeof(outbuf) || strm.avail_in == 0) { nextSink(outbuf, sizeof(outbuf) - strm.avail_out); - strm.next_out = reinterpret_cast<char*>(outbuf); + strm.next_out = (char*)outbuf; strm.avail_out = sizeof(outbuf); } } @@ -325,7 +325,7 @@ struct BzipCompressionSink : ChunkedCompressionSink { struct BrotliCompressionSink : ChunkedCompressionSink { Sink& nextSink; - uint8_t outbuf[BUFSIZ]{}; + uint8_t outbuf[BUFSIZ]; BrotliEncoderState* state; bool finished = false; |