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:
Kane York 2020-07-24 21:09:44 -07:00 committed by kanepyork
parent 69f402563a
commit ef54f5da9f
65 changed files with 580 additions and 497 deletions

View file

@ -33,7 +33,7 @@ std::string resolveMirrorUri(EvalState& state, std::string uri) {
}
std::string mirrorName(s, 0, p);
Value vMirrors;
Value vMirrors{};
state.eval(
state.parseExprFromString(
"import <nixpkgs/pkgs/build-support/fetchurl/mirrors.nix>", "."),
@ -120,7 +120,7 @@ static int _main(int argc, char** argv) {
} else {
Path path =
resolveExprPath(lookupFileArg(*state, args.empty() ? "." : args[0]));
Value vRoot;
Value vRoot{};
state->evalFile(path, vRoot);
Value& v(*findAlongAttrPath(*state, attrPath, autoArgs, vRoot));
state->forceAttrs(v);
@ -180,7 +180,7 @@ static int _main(int argc, char** argv) {
auto actualUri = resolveMirrorUri(*state, uri);
AutoDelete tmpDir(createTempDir(), true);
Path tmpFile = (Path)tmpDir + "/tmp";
Path tmpFile = Path(tmpDir) + "/tmp";
/* Download the file. */
{
@ -200,7 +200,7 @@ static int _main(int argc, char** argv) {
/* Optionally unpack the file. */
if (unpack) {
LOG(INFO) << "unpacking...";
Path unpacked = (Path)tmpDir + "/unpacked";
Path unpacked = Path(tmpDir) + "/unpacked";
createDirs(unpacked);
if (absl::EndsWith(baseNameOf(uri), ".zip")) {
runProgram("unzip", true, {"-qq", tmpFile, "-d", unpacked});