aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-10-06 14:00:42 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-10-06 14:52:30 +0200
commitad143c5b3b7e713b89f0437ce17c20ac642ca530 (patch)
treee81c2c5e57115d9882ec22ed02e91fd8ea7c41b0 /src/libfetchers
parent2856878b411694d2a815a88a5b3fe81c0f15811e (diff)
Shut up some clang warnings
Diffstat (limited to 'src/libfetchers')
-rw-r--r--src/libfetchers/fetchers.hh3
-rw-r--r--src/libfetchers/github.cc6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/libfetchers/fetchers.hh b/src/libfetchers/fetchers.hh
index cc31a31b9..e8ae59143 100644
--- a/src/libfetchers/fetchers.hh
+++ b/src/libfetchers/fetchers.hh
@@ -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;
diff --git a/src/libfetchers/github.cc b/src/libfetchers/github.cc
index 90893075e..92ff224f7 100644
--- a/src/libfetchers/github.cc
+++ b/src/libfetchers/github.cc
@@ -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
{
@@ -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
@@ -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