Shut up some clang warnings

This commit is contained in:
Eelco Dolstra 2020-10-06 14:00:42 +02:00
parent 2856878b41
commit ad143c5b3b
5 changed files with 10 additions and 6 deletions

View file

@ -11,7 +11,7 @@ namespace nix::eval_cache {
MakeError(CachedEvalError, EvalError); MakeError(CachedEvalError, EvalError);
class AttrDb; struct AttrDb;
class AttrCursor; class AttrCursor;
class EvalCache : public std::enable_shared_from_this<EvalCache> class EvalCache : public std::enable_shared_from_this<EvalCache>

View file

@ -86,6 +86,9 @@ public:
struct InputScheme struct InputScheme
{ {
virtual ~InputScheme()
{ }
virtual std::optional<Input> inputFromURL(const ParsedURL & url) = 0; virtual std::optional<Input> inputFromURL(const ParsedURL & url) = 0;
virtual std::optional<Input> inputFromAttrs(const Attrs & attrs) = 0; virtual std::optional<Input> inputFromAttrs(const Attrs & attrs) = 0;

View file

@ -25,7 +25,7 @@ struct GitArchiveInputScheme : InputScheme
{ {
virtual std::string type() = 0; virtual std::string type() = 0;
virtual std::optional<std::pair<std::string, std::string> > accessHeaderFromToken(const std::string & token) const = 0; virtual std::optional<std::pair<std::string, std::string>> accessHeaderFromToken(const std::string & token) const = 0;
std::optional<Input> inputFromURL(const ParsedURL & url) override std::optional<Input> inputFromURL(const ParsedURL & url) override
{ {
@ -215,7 +215,7 @@ struct GitHubInputScheme : GitArchiveInputScheme
{ {
std::string type() override { return "github"; } std::string type() override { return "github"; }
std::optional<std::pair<std::string, std::string> > accessHeaderFromToken(const std::string & token) const std::optional<std::pair<std::string, std::string>> accessHeaderFromToken(const std::string & token) const override
{ {
// Github supports PAT/OAuth2 tokens and HTTP Basic // Github supports PAT/OAuth2 tokens and HTTP Basic
// Authentication. The former simply specifies the token, the // Authentication. The former simply specifies the token, the
@ -270,7 +270,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
{ {
std::string type() override { return "gitlab"; } std::string type() override { return "gitlab"; }
std::optional<std::pair<std::string, std::string> > accessHeaderFromToken(const std::string & token) const std::optional<std::pair<std::string, std::string>> accessHeaderFromToken(const std::string & token) const override
{ {
// Gitlab supports 4 kinds of authorization, two of which are // Gitlab supports 4 kinds of authorization, two of which are
// relevant here: OAuth2 and PAT (Private Access Token). The // relevant here: OAuth2 and PAT (Private Access Token). The

View file

@ -18,8 +18,7 @@ struct DummyStore : public Store, public virtual DummyStoreConfig
DummyStore(const Params & params) DummyStore(const Params & params)
: StoreConfig(params) : StoreConfig(params)
, Store(params) , Store(params)
{ { }
}
string getUri() override string getUri() override
{ {

View file

@ -194,6 +194,8 @@ struct StoreConfig : public Config
*/ */
StoreConfig() { assert(false); } StoreConfig() { assert(false); }
virtual ~StoreConfig() { }
virtual const std::string name() = 0; virtual const std::string name() = 0;
const PathSetting storeDir_{this, false, settings.nixStore, const PathSetting storeDir_{this, false, settings.nixStore,