mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-11-30 02:37:57 +08:00
Fix unused parameter errors/warnings (#805)
This commit is contained in:
parent
44a8a2d5f7
commit
ab5eb955b4
7
.github/workflows/cmake.yml
vendored
7
.github/workflows/cmake.yml
vendored
@ -109,7 +109,7 @@ jobs:
|
||||
# Installing packages might fail as the github image becomes outdated
|
||||
sudo apt update
|
||||
# These aren't available or don't work well in vcpkg
|
||||
sudo apt install libjsoncpp-dev uuid-dev openssl libssl-dev zlib1g-dev postgresql-all libsqlite3-dev
|
||||
sudo apt install libjsoncpp-dev uuid-dev openssl libssl-dev zlib1g-dev libsqlite3-dev
|
||||
sudo apt install libbrotli-dev
|
||||
- name: (Linux) Install gcc-10
|
||||
if: matrix.buildname == 'ubuntu-20.04/gcc-10'
|
||||
@ -122,6 +122,11 @@ jobs:
|
||||
sudo apt update
|
||||
sudo apt install boost1.67
|
||||
|
||||
- name: (Linux) Install postgresql
|
||||
if: matrix.os == 'ubuntu-20.04'
|
||||
run: |
|
||||
sudo apt install postgresql-all
|
||||
|
||||
- name: install gtest
|
||||
run: |
|
||||
wget https://github.com/google/googletest/archive/release-1.10.0.tar.gz
|
||||
|
@ -73,8 +73,13 @@ std::vector<trantor::EventLoop *> ListenerManager::createListeners(
|
||||
const WebSocketNewAsyncCallback &webSocketCallback,
|
||||
const ConnectionCallback &connectionCallback,
|
||||
size_t connectionTimeout,
|
||||
#ifdef OpenSSL_FOUND
|
||||
const std::string &globalCertFile,
|
||||
const std::string &globalKeyFile,
|
||||
#else
|
||||
const std::string & /*globalCertFile*/,
|
||||
const std::string & /*globalKeyFile*/,
|
||||
#endif
|
||||
size_t threadNum,
|
||||
const std::vector<std::function<HttpResponsePtr(const HttpRequestPtr &)>>
|
||||
&syncAdvices)
|
||||
|
@ -1161,13 +1161,13 @@ std::string brotliDecompress(const char *data, const size_t ndata)
|
||||
return decompressed;
|
||||
}
|
||||
#else
|
||||
std::string brotliCompress(const char *data, const size_t ndata)
|
||||
std::string brotliCompress(const char * /*data*/, const size_t /*ndata*/)
|
||||
{
|
||||
LOG_ERROR << "If you do not have the brotli package installed, you cannot "
|
||||
"use brotliCompress()";
|
||||
abort();
|
||||
}
|
||||
std::string brotliDecompress(const char *data, const size_t ndata)
|
||||
std::string brotliDecompress(const char * /*data*/, const size_t /*ndata*/)
|
||||
{
|
||||
LOG_ERROR << "If you do not have the brotli package installed, you cannot "
|
||||
"use brotliDecompress()";
|
||||
|
@ -182,7 +182,7 @@ void RedisClientImpl::newTransactionAsync(
|
||||
std::weak_ptr<RedisClientImpl> thisWeakPtr = shared_from_this();
|
||||
std::lock_guard<std::mutex> lock(connectionsMutex_);
|
||||
tasks_.emplace(
|
||||
[callback, thisWeakPtr](const RedisConnectionPtr &connPtr) {
|
||||
[callback, thisWeakPtr](const RedisConnectionPtr & /*connPtr*/) {
|
||||
auto thisPtr = thisWeakPtr.lock();
|
||||
if (thisPtr)
|
||||
{
|
||||
@ -230,4 +230,4 @@ void RedisClientImpl::handleNextTask(const RedisConnectionPtr &connPtr)
|
||||
{
|
||||
task(connPtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ void RedisClientLockFree::newTransactionAsync(
|
||||
{
|
||||
std::weak_ptr<RedisClientLockFree> thisWeakPtr = shared_from_this();
|
||||
tasks_.emplace(
|
||||
[callback, thisWeakPtr](const RedisConnectionPtr &connPtr) {
|
||||
[callback, thisWeakPtr](const RedisConnectionPtr & /*connPtr*/) {
|
||||
auto thisPtr = thisWeakPtr.lock();
|
||||
if (thisPtr)
|
||||
{
|
||||
@ -205,4 +205,4 @@ void RedisClientLockFree::handleNextTask(const RedisConnectionPtr &connPtr)
|
||||
{
|
||||
task(connPtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ void RedisConnection::startConnectionInLoop()
|
||||
}
|
||||
});
|
||||
redisAsyncSetDisconnectCallback(
|
||||
redisContext_, [](const redisAsyncContext *context, int status) {
|
||||
redisContext_, [](const redisAsyncContext *context, int /*status*/) {
|
||||
auto thisPtr = static_cast<RedisConnection *>(context->ev.data);
|
||||
|
||||
thisPtr->handleDisconnect();
|
||||
@ -176,7 +176,7 @@ void RedisConnection::delRead(void *userData)
|
||||
assert(thisPtr->channel_);
|
||||
thisPtr->channel_->disableReading();
|
||||
}
|
||||
void RedisConnection::cleanup(void *userData)
|
||||
void RedisConnection::cleanup(void * /*userData*/)
|
||||
{
|
||||
LOG_TRACE << "cleanup";
|
||||
}
|
||||
@ -205,7 +205,7 @@ void RedisConnection::sendCommandInLoop(
|
||||
|
||||
redisAsyncFormattedCommand(
|
||||
redisContext_,
|
||||
[](redisAsyncContext *context, void *r, void *userData) {
|
||||
[](redisAsyncContext *context, void *r, void * /*userData*/) {
|
||||
auto thisPtr = static_cast<RedisConnection *>(context->ev.data);
|
||||
thisPtr->handleResult(static_cast<redisReply *>(r));
|
||||
},
|
||||
|
@ -65,8 +65,8 @@ void RedisTransactionImpl::execCommandAsync(
|
||||
void RedisTransactionImpl::doBegin()
|
||||
{
|
||||
assert(!isExecutedOrCancelled_);
|
||||
execCommandAsync([](const RedisResult &result) {},
|
||||
[](const RedisException &err) {},
|
||||
execCommandAsync([](const RedisResult & /*result*/) {},
|
||||
[](const RedisException & /*err*/) {},
|
||||
"MULTI");
|
||||
}
|
||||
|
||||
@ -75,9 +75,9 @@ RedisTransactionImpl::~RedisTransactionImpl()
|
||||
if (!isExecutedOrCancelled_)
|
||||
{
|
||||
LOG_WARN << "The transaction is not executed before being destroyed";
|
||||
connPtr_->sendCommand([](const RedisResult &result) {},
|
||||
[](const RedisException &err) {},
|
||||
connPtr_->sendCommand([](const RedisResult & /*result*/) {},
|
||||
[](const RedisException & /*err*/) {},
|
||||
"DISCARD");
|
||||
}
|
||||
LOG_TRACE << "transaction is destroyed";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user