forked from lix-project/lix
Merge pull request #9289 from edolstra/fix-warnings
Fix gcc warnings (cherry picked from commit66cb364f58
) Change-Id:I1474dbc18a4beaaf1bce16d4abbcc99806b79ff1
This commit is contained in:
parent
2633ca3f88
commit
6e0dd9f673
|
@ -175,7 +175,7 @@ void BuiltPathsCommand::run(ref<Store> store, Installables && installables)
|
||||||
throw UsageError("'--all' does not expect arguments");
|
throw UsageError("'--all' does not expect arguments");
|
||||||
// XXX: Only uses opaque paths, ignores all the realisations
|
// XXX: Only uses opaque paths, ignores all the realisations
|
||||||
for (auto & p : store->queryAllValidPaths())
|
for (auto & p : store->queryAllValidPaths())
|
||||||
paths.push_back(BuiltPath::Opaque{p});
|
paths.emplace_back(BuiltPath::Opaque{p});
|
||||||
} else {
|
} else {
|
||||||
paths = Installable::toBuiltPaths(getEvalStore(), store, realiseMode, operateOn, installables);
|
paths = Installable::toBuiltPaths(getEvalStore(), store, realiseMode, operateOn, installables);
|
||||||
if (recursive) {
|
if (recursive) {
|
||||||
|
@ -188,7 +188,7 @@ void BuiltPathsCommand::run(ref<Store> store, Installables && installables)
|
||||||
}
|
}
|
||||||
store->computeFSClosure(pathsRoots, pathsClosure);
|
store->computeFSClosure(pathsRoots, pathsClosure);
|
||||||
for (auto & path : pathsClosure)
|
for (auto & path : pathsClosure)
|
||||||
paths.push_back(BuiltPath::Opaque{path});
|
paths.emplace_back(BuiltPath::Opaque{path});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -669,7 +669,7 @@ BuiltPaths Installable::toBuiltPaths(
|
||||||
|
|
||||||
BuiltPaths res;
|
BuiltPaths res;
|
||||||
for (auto & drvPath : Installable::toDerivations(store, installables, true))
|
for (auto & drvPath : Installable::toDerivations(store, installables, true))
|
||||||
res.push_back(BuiltPath::Opaque{drvPath});
|
res.emplace_back(BuiltPath::Opaque{drvPath});
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -353,7 +353,7 @@ Derivation parseDerivation(
|
||||||
expect(str, "erive(");
|
expect(str, "erive(");
|
||||||
version = DerivationATermVersion::Traditional;
|
version = DerivationATermVersion::Traditional;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r': {
|
||||||
expect(str, "rvWithVersion(");
|
expect(str, "rvWithVersion(");
|
||||||
auto versionS = parseString(str);
|
auto versionS = parseString(str);
|
||||||
if (versionS == "xp-dyn-drv") {
|
if (versionS == "xp-dyn-drv") {
|
||||||
|
@ -366,6 +366,9 @@ Derivation parseDerivation(
|
||||||
expect(str, ",");
|
expect(str, ",");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
throw Error("derivation does not start with 'Derive' or 'DrvWithVersion'");
|
||||||
|
}
|
||||||
|
|
||||||
/* Parse the list of outputs. */
|
/* Parse the list of outputs. */
|
||||||
expect(str, "[");
|
expect(str, "[");
|
||||||
|
|
|
@ -815,7 +815,7 @@ void Store::substitutePaths(const StorePathSet & paths)
|
||||||
std::vector<DerivedPath> paths2;
|
std::vector<DerivedPath> paths2;
|
||||||
for (auto & path : paths)
|
for (auto & path : paths)
|
||||||
if (!path.isDerivation())
|
if (!path.isDerivation())
|
||||||
paths2.push_back(DerivedPath::Opaque{path});
|
paths2.emplace_back(DerivedPath::Opaque{path});
|
||||||
uint64_t downloadSize, narSize;
|
uint64_t downloadSize, narSize;
|
||||||
StorePathSet willBuild, willSubstitute, unknown;
|
StorePathSet willBuild, willSubstitute, unknown;
|
||||||
queryMissing(paths2,
|
queryMissing(paths2,
|
||||||
|
|
|
@ -449,7 +449,7 @@ static void main_nix_build(int argc, char * * argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const auto & src : drv.inputSrcs) {
|
for (const auto & src : drv.inputSrcs) {
|
||||||
pathsToBuild.push_back(DerivedPath::Opaque{src});
|
pathsToBuild.emplace_back(DerivedPath::Opaque{src});
|
||||||
pathsToCopy.insert(src);
|
pathsToCopy.insert(src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -481,12 +481,12 @@ static void printMissing(EvalState & state, DrvInfos & elems)
|
||||||
std::vector<DerivedPath> targets;
|
std::vector<DerivedPath> targets;
|
||||||
for (auto & i : elems)
|
for (auto & i : elems)
|
||||||
if (auto drvPath = i.queryDrvPath())
|
if (auto drvPath = i.queryDrvPath())
|
||||||
targets.push_back(DerivedPath::Built{
|
targets.emplace_back(DerivedPath::Built{
|
||||||
.drvPath = makeConstantStorePathRef(*drvPath),
|
.drvPath = makeConstantStorePathRef(*drvPath),
|
||||||
.outputs = OutputsSpec::All { },
|
.outputs = OutputsSpec::All { },
|
||||||
});
|
});
|
||||||
else
|
else
|
||||||
targets.push_back(DerivedPath::Opaque{
|
targets.emplace_back(DerivedPath::Opaque{
|
||||||
.path = i.queryOutPath(),
|
.path = i.queryOutPath(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue