Fix clang warnings

This commit is contained in:
Eelco Dolstra 2019-11-26 21:07:44 +01:00
parent 425991883a
commit 313106d549
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
5 changed files with 8 additions and 3 deletions

View file

@ -10,6 +10,8 @@ class NarInfoDiskCache
public:
typedef enum { oValid, oInvalid, oUnknown } Outcome;
virtual ~NarInfoDiskCache() { };
virtual void createCache(const std::string & uri, const Path & storeDir,
bool wantMassQuery, int priority) = 0;

View file

@ -148,7 +148,7 @@ public:
std::string getUri() override;
bool sameMachine()
bool sameMachine() override
{ return true; }
private:

View file

@ -35,7 +35,7 @@ public:
return uriScheme + host;
}
bool sameMachine()
bool sameMachine() override
{ return false; }
void narFromPath(const Path & path, Sink & sink) override;

View file

@ -216,7 +216,7 @@ static std::string makeType(string && type, const PathSet & references)
type += ":";
type += i;
}
return type;
return std::move(type);
}

View file

@ -16,6 +16,7 @@ struct Pos;
run() method. */
struct Command : virtual Args
{
virtual ~Command() { }
virtual std::string name() = 0;
virtual void prepare() { };
virtual void run() = 0;
@ -58,6 +59,8 @@ typedef std::vector<Buildable> Buildables;
struct Installable
{
virtual ~Installable() { }
virtual std::string what() = 0;
virtual Buildables toBuildables()