chore(3p/nix): Minor fixes to get rid of warnings

This commit is contained in:
Vincent Ambo 2020-05-21 00:23:51 +01:00
parent 9dfdf16a8d
commit a3b48e6562
3 changed files with 3 additions and 7 deletions

View file

@ -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);
}; };

View file

@ -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;

View file

@ -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
*/ */