fix(3p/nix): apply all clang-tidy fixes
Change-Id: I265e763393422ee1881653527c91024458060825 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1432 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
69f402563a
commit
ef54f5da9f
65 changed files with 580 additions and 497 deletions
|
|
@ -112,7 +112,7 @@ static void update(const StringSet& channelNames) {
|
|||
std::smatch match;
|
||||
auto urlBase = baseNameOf(url);
|
||||
if (std::regex_search(urlBase, match, std::regex("(-\\d.*)$"))) {
|
||||
cname = cname + (std::string)match[1];
|
||||
cname = cname + std::string(match[1]);
|
||||
}
|
||||
|
||||
std::string extraAttrs;
|
||||
|
|
@ -163,7 +163,7 @@ static void update(const StringSet& channelNames) {
|
|||
runProgram(settings.nixBinDir + "/nix-env", false, envArgs);
|
||||
|
||||
// Make the channels appear in nix-env.
|
||||
struct stat st;
|
||||
struct stat st {};
|
||||
if (lstat(nixDefExpr.c_str(), &st) == 0) {
|
||||
if (S_ISLNK(st.st_mode)) {
|
||||
// old-skool ~/.nix-defexpr
|
||||
|
|
@ -193,7 +193,7 @@ static int _main(int argc, char** argv) {
|
|||
enum { cNone, cAdd, cRemove, cList, cUpdate, cRollback } cmd = cNone;
|
||||
std::vector<std::string> args;
|
||||
parseCmdLine(argc, argv,
|
||||
[&](Strings::iterator& arg, const Strings::iterator& end) {
|
||||
[&](Strings::iterator& arg, const Strings::iterator& _end) {
|
||||
if (*arg == "--help") {
|
||||
showManPage("nix-channel");
|
||||
} else if (*arg == "--version") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue