chore(3p/nix): Minor fixes to get rid of warnings
This commit is contained in:
parent
9dfdf16a8d
commit
a3b48e6562
3 changed files with 3 additions and 7 deletions
6
third_party/nix/src/libutil/args.hh
vendored
6
third_party/nix/src/libutil/args.hh
vendored
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
MakeError(UsageError, Error);
|
MakeError(UsageError, Error)
|
||||||
|
|
||||||
enum HashType : char;
|
enum HashType : char;
|
||||||
|
|
||||||
|
@ -118,14 +118,14 @@ class Args {
|
||||||
flag->arity = 1;
|
flag->arity = 1;
|
||||||
flag->handler = [=](std::vector<std::string> ss) { *dest = ss[0]; };
|
flag->handler = [=](std::vector<std::string> ss) { *dest = ss[0]; };
|
||||||
return *this;
|
return *this;
|
||||||
};
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
FlagMaker& set(T* dest, const T& val) {
|
FlagMaker& set(T* dest, const T& val) {
|
||||||
flag->arity = 0;
|
flag->arity = 0;
|
||||||
flag->handler = [=](std::vector<std::string> ss) { *dest = val; };
|
flag->handler = [=](std::vector<std::string> ss) { *dest = val; };
|
||||||
return *this;
|
return *this;
|
||||||
};
|
}
|
||||||
|
|
||||||
FlagMaker& mkHashTypeFlag(HashType* ht);
|
FlagMaker& mkHashTypeFlag(HashType* ht);
|
||||||
};
|
};
|
||||||
|
|
2
third_party/nix/src/libutil/util.cc
vendored
2
third_party/nix/src/libutil/util.cc
vendored
|
@ -35,8 +35,6 @@
|
||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__attribute__((weak));
|
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
const std::string nativeSystem = SYSTEM;
|
const std::string nativeSystem = SYSTEM;
|
||||||
|
|
2
third_party/nix/src/nix-build/nix-build.cc
vendored
2
third_party/nix/src/nix-build/nix-build.cc
vendored
|
@ -23,8 +23,6 @@
|
||||||
using namespace nix;
|
using namespace nix;
|
||||||
using namespace std::string_literals;
|
using namespace std::string_literals;
|
||||||
|
|
||||||
__attribute__((weak));
|
|
||||||
|
|
||||||
/* Recreate the effect of the perl shellwords function, breaking up a
|
/* Recreate the effect of the perl shellwords function, breaking up a
|
||||||
* string into arguments like a shell word, including escapes
|
* string into arguments like a shell word, including escapes
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue