diff --git a/lib/src/HttpMessageBody.h b/lib/src/HttpMessageBody.h index 249e3139..023bcdef 100644 --- a/lib/src/HttpMessageBody.h +++ b/lib/src/HttpMessageBody.h @@ -48,6 +48,9 @@ class HttpMessageBody virtual void append(const char *buf, size_t len) { } + virtual ~HttpMessageBody() + { + } protected: BodyType type_{BodyType::kNone}; diff --git a/lib/src/SharedLibManager.cc b/lib/src/SharedLibManager.cc index fd8b642b..78b5ca06 100644 --- a/lib/src/SharedLibManager.cc +++ b/lib/src/SharedLibManager.cc @@ -217,7 +217,6 @@ void *SharedLibManager::compileAndLoadLib(const std::string &sourceFile, auto soFile = sourceFile.substr(0, pos); soFile.append(".so"); cmd.append(soFile); - void *Handle = nullptr; LOG_TRACE << cmd; if (system(cmd.c_str()) == 0) diff --git a/lib/src/StaticFileRouter.cc b/lib/src/StaticFileRouter.cc index cee3cad9..06c8d287 100644 --- a/lib/src/StaticFileRouter.cc +++ b/lib/src/StaticFileRouter.cc @@ -72,7 +72,6 @@ void StaticFileRouter::route( for (auto &location : **ioLocationsPtr_) { auto &URI = location.uriPrefix_; - auto &defaultContentType = location.defaultContentType_; if (location.realLocation_.empty()) { if (!location.alias_.empty()) diff --git a/lib/src/Utilities.cc b/lib/src/Utilities.cc index e523c201..c8e5f063 100644 --- a/lib/src/Utilities.cc +++ b/lib/src/Utilities.cc @@ -63,25 +63,27 @@ class Base64CharMap Base64CharMap() { char index = 0; - for (char c = 'A'; c <= 'Z'; ++c) + for (int c = 'A'; c <= 'Z'; ++c) { charMap_[c] = index++; } - for (char c = 'a'; c <= 'z'; ++c) + for (int c = 'a'; c <= 'z'; ++c) { charMap_[c] = index++; } - for (char c = '0'; c <= '9'; ++c) + for (int c = '0'; c <= '9'; ++c) { charMap_[c] = index++; } - charMap_['+'] = charMap_['-'] = index++; - charMap_['/'] = charMap_['_'] = index; + charMap_[static_cast('+')] = charMap_[static_cast('-')] = + index++; + charMap_[static_cast('/')] = charMap_[static_cast('_')] = + index; charMap_[0] = 0xff; } char getIndex(const char c) const noexcept { - return charMap_[c]; + return charMap_[static_cast(c)]; } private: @@ -120,7 +122,7 @@ std::string genRandomString(int length) "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; static std::once_flag once; static const size_t len = strlen(char_space); - static const size_t randMax = RAND_MAX - (RAND_MAX % len); + static const int randMax = RAND_MAX - (RAND_MAX % len); std::call_once(once, []() { std::srand(static_cast(time(nullptr))); }); diff --git a/orm_lib/inc/drogon/orm/SqlBinder.h b/orm_lib/inc/drogon/orm/SqlBinder.h index 1c97726e..67e7c8b0 100644 --- a/orm_lib/inc/drogon/orm/SqlBinder.h +++ b/orm_lib/inc/drogon/orm/SqlBinder.h @@ -254,18 +254,18 @@ class SqlBinder SqlBinder(const std::string &sql, DbClient &client, ClientType type) : sqlPtr_(std::make_shared(sql)), - client_(client), - type_(type), sqlViewPtr_(sqlPtr_->data()), - sqlViewLength_(sqlPtr_->length()) + sqlViewLength_(sqlPtr_->length()), + client_(client), + type_(type) { } SqlBinder(std::string &&sql, DbClient &client, ClientType type) : sqlPtr_(std::make_shared(std::move(sql))), - client_(client), - type_(type), sqlViewPtr_(sqlPtr_->data()), - sqlViewLength_(sqlPtr_->length()) + sqlViewLength_(sqlPtr_->length()), + client_(client), + type_(type) { } SqlBinder(const char *sql, diff --git a/trantor b/trantor index bb48ddfc..5ab4a4c8 160000 --- a/trantor +++ b/trantor @@ -1 +1 @@ -Subproject commit bb48ddfcf106874f5b4db9abbd13b9392eba9a23 +Subproject commit 5ab4a4c85eb119fae96541d7f6723ba4ecef4791