mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 22:12:43 +01: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
|
|
@ -1229,7 +1229,7 @@ HookReply DerivationGoal::tryBuildHook()
|
|||
hook->toHook.writeSide.close();
|
||||
|
||||
/* Create the log file and pipe. */
|
||||
Path logFile = openLogFile();
|
||||
[[maybe_unused]] Path logFile = openLogFile();
|
||||
|
||||
std::set<MuxablePipePollState::CommChannel> fds;
|
||||
fds.insert(hook->fromHook.readSide.get());
|
||||
|
|
|
|||
|
|
@ -13,14 +13,9 @@ void Store::exportPaths(const StorePathSet & paths, Sink & sink)
|
|||
auto sorted = topoSortPaths(paths);
|
||||
std::reverse(sorted.begin(), sorted.end());
|
||||
|
||||
std::string doneLabel("paths exported");
|
||||
//logger->incExpected(doneLabel, sorted.size());
|
||||
|
||||
for (auto & path : sorted) {
|
||||
//Activity act(*logger, lvlInfo, "exporting path '%s'", path);
|
||||
sink << 1;
|
||||
exportPath(path, sink);
|
||||
//logger->incProgress(doneLabel);
|
||||
}
|
||||
|
||||
sink << 0;
|
||||
|
|
|
|||
|
|
@ -883,7 +883,7 @@ void LocalDerivationGoal::startBuilder()
|
|||
printMsg(lvlVomit, "setting builder env variable '%1%'='%2%'", i.first, i.second);
|
||||
|
||||
/* Create the log file. */
|
||||
Path logFile = openLogFile();
|
||||
[[maybe_unused]] Path logFile = openLogFile();
|
||||
|
||||
/* Create a pseudoterminal to get the output of the builder. */
|
||||
builderOut = posix_openpt(O_RDWR | O_NOCTTY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue