Skip to content

Commit

Permalink
Shut up some clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Oct 6, 2020
1 parent 2856878 commit ad143c5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/libexpr/eval-cache.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace nix::eval_cache {

MakeError(CachedEvalError, EvalError);

class AttrDb;
struct AttrDb;
class AttrCursor;

class EvalCache : public std::enable_shared_from_this<EvalCache>
Expand Down
3 changes: 3 additions & 0 deletions src/libfetchers/fetchers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ public:

struct InputScheme
{
virtual ~InputScheme()
{ }

virtual std::optional<Input> inputFromURL(const ParsedURL & url) = 0;

virtual std::optional<Input> inputFromAttrs(const Attrs & attrs) = 0;
Expand Down
6 changes: 3 additions & 3 deletions src/libfetchers/github.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct GitArchiveInputScheme : InputScheme
{
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
{
Expand Down Expand Up @@ -215,7 +215,7 @@ struct GitHubInputScheme : GitArchiveInputScheme
{
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
// Authentication. The former simply specifies the token, the
Expand Down Expand Up @@ -270,7 +270,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
{
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
// relevant here: OAuth2 and PAT (Private Access Token). The
Expand Down
3 changes: 1 addition & 2 deletions src/libstore/dummy-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ struct DummyStore : public Store, public virtual DummyStoreConfig
DummyStore(const Params & params)
: StoreConfig(params)
, Store(params)
{
}
{ }

string getUri() override
{
Expand Down
2 changes: 2 additions & 0 deletions src/libstore/store-api.hh
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ struct StoreConfig : public Config
*/
StoreConfig() { assert(false); }

virtual ~StoreConfig() { }

virtual const std::string name() = 0;

const PathSetting storeDir_{this, false, settings.nixStore,
Expand Down

0 comments on commit ad143c5

Please sign in to comment.