forked from lix-project/lix
Merge pull request #8812 from tweag/fix-clang-tidy
Fix some warnings/bugs found by clang-tidy
This commit is contained in:
commit
10afcf06aa
|
@ -108,7 +108,8 @@ public:
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void stop() override
|
/* Called by destructor, can't be overridden */
|
||||||
|
void stop() override final
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
auto state(state_.lock());
|
auto state(state_.lock());
|
||||||
|
|
|
@ -272,8 +272,10 @@ struct LocalDerivationGoal : public DerivationGoal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forcibly kill the child process, if any.
|
* Forcibly kill the child process, if any.
|
||||||
|
*
|
||||||
|
* Called by destructor, can't be overridden
|
||||||
*/
|
*/
|
||||||
void killChild() override;
|
void killChild() override final;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kill any processes running under the build user UID or in the
|
* Kill any processes running under the build user UID or in the
|
||||||
|
|
|
@ -114,7 +114,8 @@ public:
|
||||||
void handleChildOutput(int fd, std::string_view data) override;
|
void handleChildOutput(int fd, std::string_view data) override;
|
||||||
void handleEOF(int fd) override;
|
void handleEOF(int fd) override;
|
||||||
|
|
||||||
void cleanup() override;
|
/* Called by destructor, can't be overridden */
|
||||||
|
void cleanup() override final;
|
||||||
|
|
||||||
JobCategory jobCategory() override { return JobCategory::Substitution; };
|
JobCategory jobCategory() override { return JobCategory::Substitution; };
|
||||||
};
|
};
|
||||||
|
|
|
@ -863,6 +863,8 @@ void FileTransfer::download(FileTransferRequest && request, Sink & sink)
|
||||||
}
|
}
|
||||||
|
|
||||||
chunk = std::move(state->data);
|
chunk = std::move(state->data);
|
||||||
|
/* Reset state->data after the move, since we check data.empty() */
|
||||||
|
state->data = "";
|
||||||
|
|
||||||
state->request.notify_one();
|
state->request.notify_one();
|
||||||
}
|
}
|
||||||
|
|
|
@ -410,8 +410,8 @@ nlohmann::json MultiCommand::toJSON()
|
||||||
auto cat = nlohmann::json::object();
|
auto cat = nlohmann::json::object();
|
||||||
cat["id"] = command->category();
|
cat["id"] = command->category();
|
||||||
cat["description"] = trim(categories[command->category()]);
|
cat["description"] = trim(categories[command->category()]);
|
||||||
j["category"] = std::move(cat);
|
|
||||||
cat["experimental-feature"] = command->experimentalFeature();
|
cat["experimental-feature"] = command->experimentalFeature();
|
||||||
|
j["category"] = std::move(cat);
|
||||||
cmds[name] = std::move(j);
|
cmds[name] = std::move(j);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ public:
|
||||||
case lvlWarn: c = '4'; break;
|
case lvlWarn: c = '4'; break;
|
||||||
case lvlNotice: case lvlInfo: c = '5'; break;
|
case lvlNotice: case lvlInfo: c = '5'; break;
|
||||||
case lvlTalkative: case lvlChatty: c = '6'; break;
|
case lvlTalkative: case lvlChatty: c = '6'; break;
|
||||||
case lvlDebug: case lvlVomit: c = '7';
|
case lvlDebug: case lvlVomit: c = '7'; break;
|
||||||
default: c = '7'; break; // should not happen, and missing enum case is reported by -Werror=switch-enum
|
default: c = '7'; break; // should not happen, and missing enum case is reported by -Werror=switch-enum
|
||||||
}
|
}
|
||||||
prefix = std::string("<") + c + ">";
|
prefix = std::string("<") + c + ">";
|
||||||
|
|
Loading…
Reference in a new issue