Shut up some clang warnings

This commit is contained in:
Eelco Dolstra 2016-05-31 13:31:04 +02:00
parent 10f3a2e5f2
commit a9fa5e050a
4 changed files with 12 additions and 10 deletions

View file

@ -78,10 +78,10 @@ public:
{ return {}; } { return {}; }
void querySubstitutablePathInfos(const PathSet & paths, void querySubstitutablePathInfos(const PathSet & paths,
SubstitutablePathInfos & infos) SubstitutablePathInfos & infos) override
{ } { }
bool wantMassQuery() { return wantMassQuery_; } bool wantMassQuery() override { return wantMassQuery_; }
void addToStore(const ValidPathInfo & info, const std::string & nar, void addToStore(const ValidPathInfo & info, const std::string & nar,
bool repair = false, bool dontCheckSigs = false) override; bool repair = false, bool dontCheckSigs = false) override;
@ -128,7 +128,7 @@ public:
ref<FSAccessor> getFSAccessor() override; ref<FSAccessor> getFSAccessor() override;
void addSignatures(const Path & storePath, const StringSet & sigs) void addSignatures(const Path & storePath, const StringSet & sigs) override
{ notImpl(); } { notImpl(); }
}; };

View file

@ -56,7 +56,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
diskCache = getNarInfoDiskCache(); diskCache = getNarInfoDiskCache();
} }
std::string getUri() std::string getUri() override
{ {
return "s3://" + bucketName; return "s3://" + bucketName;
} }
@ -69,7 +69,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
return res; return res;
} }
void init() void init() override
{ {
if (!diskCache->cacheExists(getUri())) { if (!diskCache->cacheExists(getUri())) {
@ -108,7 +108,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
fetches the .narinfo file, rather than first checking for its fetches the .narinfo file, rather than first checking for its
existence via a HEAD request. Since .narinfos are small, doing existence via a HEAD request. Since .narinfos are small, doing
a GET is unlikely to be slower than HEAD. */ a GET is unlikely to be slower than HEAD. */
bool isValidPathUncached(const Path & storePath) bool isValidPathUncached(const Path & storePath) override
{ {
try { try {
queryPathInfo(storePath); queryPathInfo(storePath);
@ -118,7 +118,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
} }
} }
bool fileExists(const std::string & path) bool fileExists(const std::string & path) override
{ {
stats.head++; stats.head++;
@ -138,7 +138,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
return true; return true;
} }
void upsertFile(const std::string & path, const std::string & data) void upsertFile(const std::string & path, const std::string & data) override
{ {
auto request = auto request =
Aws::S3::Model::PutObjectRequest() Aws::S3::Model::PutObjectRequest()
@ -167,7 +167,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
stats.putTimeMs += duration; stats.putTimeMs += duration;
} }
std::shared_ptr<std::string> getFile(const std::string & path) std::shared_ptr<std::string> getFile(const std::string & path) override
{ {
debug(format("fetching s3://%1%/%2%...") % bucketName % path); debug(format("fetching s3://%1%/%2%...") % bucketName % path);

View file

@ -49,6 +49,8 @@ public:
StorePathsCommand(); StorePathsCommand();
using StoreCommand::run;
virtual void run(ref<Store> store, Paths storePaths) = 0; virtual void run(ref<Store> store, Paths storePaths) = 0;
void run(ref<Store> store) override; void run(ref<Store> store) override;

View file

@ -89,7 +89,7 @@ public:
state->progress[label].expected += value; state->progress[label].expected += value;
} }
void incProgress(const std::string & label, uint64_t value) void incProgress(const std::string & label, uint64_t value) override
{ {
auto state(state_.lock()); auto state(state_.lock());
state->progress[label].progress += value; state->progress[label].progress += value;