Unverified Commit 2a0d0db0 authored by Dennis Jenkins's avatar Dennis Jenkins Committed by GitHub

Merge pull request #201 from JenniferBuehler/remove_warnings_4.8.4

Remove warnings gcc 4.8.4
parents 27a9c39b b9f6b90e
......@@ -253,9 +253,9 @@ namespace Async {
template<typename T>
struct Continuable : public Request {
Continuable(const std::shared_ptr<Core>& chain)
: chain_(chain)
, resolveCount_(0)
: resolveCount_(0)
, rejectCount_(0)
, chain_(chain)
{ }
void resolve(const std::shared_ptr<Core>& core) {
......
......@@ -34,9 +34,9 @@ struct Connection : public std::enable_shared_from_this<Connection> {
Connection()
: fd(-1)
, connectionState_(NotConnected)
, inflightCount(0)
, responsesReceived(0)
, connectionState_(NotConnected)
{
state_.store(static_cast<uint32_t>(State::Idle));
}
......
......@@ -52,6 +52,7 @@
#include <string>
#include <utility>
#include <type_traits>
#include <memory>
#ifdef __GNUC__
# pragma GCC diagnostic push
......@@ -4232,7 +4233,7 @@ struct fields
weekday wd{7u};
time_of_day<Duration> tod{};
fields() = default;
fields() {} // = default; // Note: doesn't compile with default
fields(year_month_day ymd_) : ymd(ymd_) {}
fields(weekday wd_) : wd(wd_) {}
......@@ -4370,7 +4371,7 @@ scan_keyword(std::basic_istream<CharT, Traits>& is, FwdIter kb, FwdIter ke)
const unsigned char does_match = '\2';
unsigned char statbuf[100];
unsigned char* status = statbuf;
unique_ptr<unsigned char, void(*)(void*)> stat_hold(0, free);
std::unique_ptr<unsigned char, void(*)(void*)> stat_hold(0, free);
if (nkw > sizeof(statbuf))
{
status = (unsigned char*)malloc(nkw);
......
......@@ -122,11 +122,6 @@ CacheControl::parseRaw(const char* str, size_t len) {
RawStreamBuf<> buf(const_cast<char *>(str), len);
StreamCursor cursor(&buf);
const char *begin = str;
auto memsize = [&](size_t s) {
return std::min(s, cursor.remaining());
};
do {
bool found = false;
......@@ -143,7 +138,6 @@ CacheControl::parseRaw(const char* str, size_t len) {
if (!found) {
for (const auto& d: TimedDirectives) {
if (match_raw(d.str, d.size, cursor)) {
int c;
if (!cursor.advance(1)) {
throw std::runtime_error("Invalid caching directive, missing delta-seconds");
}
......@@ -211,6 +205,7 @@ CacheControl::write(std::ostream& os) const {
case CacheDirective::Ext:
return "";
}
return "";
};
auto hasDelta = [](CacheDirective directive) {
......@@ -282,6 +277,9 @@ Connection::write(std::ostream& os) const {
case ConnectionControl::KeepAlive:
os << "Keep-Alive";
break;
case ConnectionControl::Ext:
os << "Ext";
break;
}
}
......
......@@ -18,14 +18,14 @@ namespace Tcp {
using namespace std;
Peer::Peer()
: fd_(-1)
, transport_(nullptr)
: transport_(nullptr)
, fd_(-1)
{ }
Peer::Peer(const Address& addr)
: addr(addr)
: transport_(nullptr)
, addr(addr)
, fd_(-1)
, transport_(nullptr)
{ }
Address
......
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