Unverified Commit 7a5c4f44 authored by Dennis Jenkins's avatar Dennis Jenkins Committed by GitHub

Merge pull request #325 from oktal/dennisjenkins75-warning-redux

Compiler warning reduction
parents 089b71b2 ea24b955
......@@ -115,19 +115,19 @@ private:
}
void retrieveAllAccounts(const Rest::Request& req, Http::ResponseWriter response) {
void retrieveAllAccounts(const Rest::Request&, Http::ResponseWriter response) {
response.send(Http::Code::Ok, "No Account");
}
void retrieveAccount(const Rest::Request& req, Http::ResponseWriter response) {
void retrieveAccount(const Rest::Request&, Http::ResponseWriter response) {
response.send(Http::Code::Ok, "The bank is closed, come back later");
}
void createAccount(const Rest::Request& req, Http::ResponseWriter response) {
void createAccount(const Rest::Request&, Http::ResponseWriter response) {
response.send(Http::Code::Ok, "The bank is closed, come back later");
}
void creditAccount(const Rest::Request& req, Http::ResponseWriter response) {
void creditAccount(const Rest::Request&, Http::ResponseWriter response) {
response.send(Http::Code::Ok, "The bank is closed, come back later");
}
......
......@@ -171,6 +171,9 @@ namespace Async {
struct Core {
Core(State _state, TypeId _id)
: state(_state)
, exc()
, mtx()
, requests()
, id(_id)
{ }
......@@ -217,6 +220,7 @@ namespace Async {
struct CoreT : public Core {
CoreT()
: Core(State::Pending, TypeId::of<T>())
, storage()
{ }
template<class Other>
......
......@@ -165,8 +165,21 @@ public:
PROTOTYPE_OF(Aio::Handler, Transport)
Transport() {}
Transport(const Transport &rhs) { UNUSED(rhs); }
Transport()
: requestsQueue()
, connectionsQueue()
, connections()
, requests()
, timeouts()
{ }
Transport(const Transport &)
: requestsQueue()
, connectionsQueue()
, connections()
, requests()
, timeouts()
{ }
typedef std::function<void()> OnResponseParsed;
......@@ -284,6 +297,7 @@ public:
private:
RequestBuilder(Client* const client)
: client_(client)
, request_()
, timeout_(std::chrono::milliseconds(0))
{ }
......
......@@ -103,6 +103,10 @@ template<typename DT> struct DataTypeValidation {
} // namespace Traits
struct ProduceConsume {
ProduceConsume()
: produce()
, consume()
{ }
std::vector<Http::Mime::MediaType> produce;
std::vector<Http::Mime::MediaType> consume;
......@@ -152,6 +156,8 @@ struct DataType {
virtual const char* format() const = 0;
virtual bool validate(const std::string& input) const = 0;
virtual ~DataType() {}
};
template<typename T>
......@@ -160,6 +166,8 @@ struct DataTypeT : public DataType {
const char* format() const { return Traits::DataTypeInfo<T>::format(); }
bool validate(const std::string& input) const { return Traits::DataTypeValidation<T>::validate(input); }
virtual ~DataTypeT() {}
};
template<typename T>
......@@ -255,6 +263,10 @@ public:
bool hasPath(const std::string& name, Http::Method method) const;
bool hasPath(const Path& path) const;
PathGroup()
: groups_()
{ }
Group paths(const std::string& name) const;
Optional<Path> path(const std::string& name, Http::Method method) const;
......@@ -437,6 +449,10 @@ class Swagger {
public:
Swagger(const Description& description)
: description_(description)
, uiPath_()
, uiDirectory_()
, apiPath_()
, serializer_()
{ }
typedef std::function<std::string (const Description&)> Serializer;
......
......@@ -174,6 +174,8 @@ public:
};
Queue()
: head()
, tail(nullptr)
{
auto *sentinel = new Entry;
sentinel->next = nullptr;
......
......@@ -235,6 +235,12 @@ public:
Route::Status route(const Http::Request& request, Http::ResponseWriter response);
Router()
: routes()
, customHandlers()
, notFoundHandler()
{ }
private:
void addRoute(Http::Method method, const std::string& resource,
......
......@@ -84,6 +84,8 @@ public:
static size_t maxSize;
ArrayStreamBuf()
: StreamBuf<CharT>()
, bytes()
{
bytes.clear();
Base::setg(bytes.data(), bytes.data(), bytes.data() + bytes.size());
......
......@@ -42,12 +42,14 @@ public:
, size_(size)
{ }
explicit ViewBase(const T* begin, const T* end) {
explicit ViewBase(const T* begin, const T* end)
: begin_(begin)
, size_(0)
{
if (begin > end) {
throw std::invalid_argument("begin > end");
}
begin_ = begin;
size_ = std::distance(begin, end);
}
......
......@@ -225,7 +225,7 @@ CookieJar::add(const Cookie& cookie) {
}
void // Unimplemented
CookieJar::removeCookie(const std::string& name) {
CookieJar::removeCookie(const std::string& /*name*/) {
// Empty for now, can be used later
}
......
......@@ -45,6 +45,9 @@ Info::Info(
: title(std::move(title))
, version(std::move(version))
, description(std::move(description))
, termsOfService()
, contact()
, license()
{ }
PathDecl::PathDecl(
......@@ -59,6 +62,10 @@ Path::Path(
, method(method)
, description(std::move(description))
, hidden(false)
, pc()
, parameters()
, responses()
, handler()
{ }
std::string
......@@ -191,6 +198,7 @@ PathBuilder::PathBuilder(Path* path)
SubPath::SubPath(
std::string prefix, PathGroup* paths)
: prefix(std::move(prefix))
, parameters()
, paths(paths)
{ }
......@@ -220,6 +228,7 @@ Parameter::Parameter(
: name(std::move(name))
, description(std::move(description))
, required(true)
, type()
{ }
Response::Response(
......@@ -260,6 +269,11 @@ InfoBuilder::license(std::string name, std::string url) {
Description::Description(
std::string title, std::string version, std::string description)
: info_(std::move(title), std::move(version), std::move(description))
, host_()
, basePath_()
, schemes_()
, pc()
, paths_()
{
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment