mirror of
https://github.com/NixOS/nix
synced 2025-07-06 00:51:47 +02:00
chore: get rid of dead code and unused variables where appropriate
Looks like some cruft has been left over from previous refactorings. This removes dead variables, which should not have side effects in their constructors. In cases where the variable initialization has a purpose [[maybe_unused]] is inserted to silence compiler warnings.
This commit is contained in:
parent
feb46688a2
commit
756758d968
12 changed files with 4 additions and 20 deletions
|
@ -90,7 +90,6 @@ void Source::operator () (std::string_view data)
|
|||
|
||||
void Source::drainInto(Sink & sink)
|
||||
{
|
||||
std::string s;
|
||||
std::array<char, 8192> buf;
|
||||
while (true) {
|
||||
size_t n;
|
||||
|
@ -427,7 +426,7 @@ Error readError(Source & source)
|
|||
auto type = readString(source);
|
||||
assert(type == "Error");
|
||||
auto level = (Verbosity) readInt(source);
|
||||
auto name = readString(source); // removed
|
||||
[[maybe_unused]] auto name = readString(source); // removed
|
||||
auto msg = readString(source);
|
||||
ErrorInfo info {
|
||||
.level = level,
|
||||
|
|
|
@ -26,7 +26,7 @@ bool isTTY()
|
|||
|
||||
std::string filterANSIEscapes(std::string_view s, bool filterAll, unsigned int width)
|
||||
{
|
||||
std::string t, e;
|
||||
std::string t;
|
||||
size_t w = 0;
|
||||
auto i = s.begin();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue