fix(3p/nix): revert "apply all clang-tidy fixes"
This reverts commit ef54f5da9f.
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
This commit is contained in:
parent
cc3c45f739
commit
72fc2fd27e
64 changed files with 479 additions and 555 deletions
22
third_party/nix/src/libutil/compression.cc
vendored
22
third_party/nix/src/libutil/compression.cc
vendored
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue