From a9fa5e050aaebe852ea5dd5c2622062db15ba3ac Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 31 May 2016 13:31:04 +0200 Subject: Shut up some clang warnings --- src/libstore/binary-cache-store.hh | 6 +++--- src/libstore/s3-binary-cache-store.cc | 12 ++++++------ src/nix/command.hh | 2 ++ src/nix/progress-bar.cc | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/libstore/binary-cache-store.hh b/src/libstore/binary-cache-store.hh index bedb4c9f0c9f..3f269b8cf024 100644 --- a/src/libstore/binary-cache-store.hh +++ b/src/libstore/binary-cache-store.hh @@ -78,10 +78,10 @@ public: { return {}; } 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, bool repair = false, bool dontCheckSigs = false) override; @@ -128,7 +128,7 @@ public: ref getFSAccessor() override; - void addSignatures(const Path & storePath, const StringSet & sigs) + void addSignatures(const Path & storePath, const StringSet & sigs) override { notImpl(); } }; diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc index 6ee27b48d61d..371bf24fd419 100644 --- a/src/libstore/s3-binary-cache-store.cc +++ b/src/libstore/s3-binary-cache-store.cc @@ -56,7 +56,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore diskCache = getNarInfoDiskCache(); } - std::string getUri() + std::string getUri() override { return "s3://" + bucketName; } @@ -69,7 +69,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore return res; } - void init() + void init() override { if (!diskCache->cacheExists(getUri())) { @@ -108,7 +108,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore fetches the .narinfo file, rather than first checking for its existence via a HEAD request. Since .narinfos are small, doing a GET is unlikely to be slower than HEAD. */ - bool isValidPathUncached(const Path & storePath) + bool isValidPathUncached(const Path & storePath) override { try { 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++; @@ -138,7 +138,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore 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 = Aws::S3::Model::PutObjectRequest() @@ -167,7 +167,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore stats.putTimeMs += duration; } - std::shared_ptr getFile(const std::string & path) + std::shared_ptr getFile(const std::string & path) override { debug(format("fetching ‘s3://%1%/%2%’...") % bucketName % path); diff --git a/src/nix/command.hh b/src/nix/command.hh index 34affc43d96e..a29cdcf7f50f 100644 --- a/src/nix/command.hh +++ b/src/nix/command.hh @@ -49,6 +49,8 @@ public: StorePathsCommand(); + using StoreCommand::run; + virtual void run(ref store, Paths storePaths) = 0; void run(ref store) override; diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc index 659d6572ad93..69811b282804 100644 --- a/src/nix/progress-bar.cc +++ b/src/nix/progress-bar.cc @@ -89,7 +89,7 @@ public: 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()); state->progress[label].progress += value; -- cgit 1.4.1