From 8d58ffb022649fd8a28d2f74845fc8ca5c934029 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sat, 29 Jul 2017 01:48:01 +0200 Subject: Remove attribute(__unused__) usage Just omitting the parameter name is more portable and less to write --- src/ssl_openssl.cc | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/ssl_openssl.cc') diff --git a/src/ssl_openssl.cc b/src/ssl_openssl.cc index 0430f22..14c3162 100644 --- a/src/ssl_openssl.cc +++ b/src/ssl_openssl.cc @@ -341,11 +341,10 @@ private: static int bio_puts(BIO* bio, const char* str) { return bio_write(bio, str, strlen(str)); } - static int bio_gets(BIO* UNUSED(bio), char* UNUSED(str), int UNUSED(size)) { + static int bio_gets(BIO*, char*, int) { return -2; } - static long bio_ctrl(BIO* UNUSED(bio), int cmd, - long UNUSED(num), void* UNUSED(ptr)) { + static long bio_ctrl(BIO*, int cmd, long, void*) { if (cmd == BIO_CTRL_FLUSH) { return 1; } @@ -453,20 +452,18 @@ protected: } // namespace // static -SSLEntropy* SSLEntropy::create(Logger* UNUSED(logger)) { +SSLEntropy* SSLEntropy::create(Logger*) { return new SSLEntropyImpl(); } // static -SSLCertStore* SSLCertStore::create(Logger* UNUSED(logger), - std::string const& bundle) { +SSLCertStore* SSLCertStore::create(Logger*, std::string const& bundle) { // TODO(the_jk): Read certificates here and not later when store is used return new SSLCertStoreImpl(bundle); } // static -bool SSLKey::generate(Logger* logger, SSLEntropy* UNUSED(entropy), - std::string* key) { +bool SSLKey::generate(Logger* logger, SSLEntropy*, std::string* key) { check_init(); RSA* rsa = RSA_new(); @@ -533,7 +530,7 @@ SSLKey* SSLKey::load(Logger* logger, std::string const& data) { } // static -bool SSLCert::generate(Logger* logger, SSLEntropy* UNUSED(entropy), +bool SSLCert::generate(Logger* logger, SSLEntropy*, SSLCert* issuer_cert, SSLKey* issuer_key, std::string const& host, SSLKey* key, std::string* cert) { @@ -693,8 +690,7 @@ SSLCert* SSLCert::load(Logger* logger, std::string const& data) { const uint16_t SSL::UNSECURE = 0x01; // static -SSL* SSL::server(Logger* logger, SSLEntropy* UNUSED(entropy), - SSLCert* cert, SSLKey* key, +SSL* SSL::server(Logger* logger, SSLEntropy*, SSLCert* cert, SSLKey* key, uint16_t flags) { std::unique_ptr ret(new SSLServerImpl(logger, flags)); if (!ret->setup(cert, key)) return nullptr; @@ -702,8 +698,8 @@ SSL* SSL::server(Logger* logger, SSLEntropy* UNUSED(entropy), } // static -SSL* SSL::client(Logger* logger, SSLEntropy* UNUSED(entropy), - SSLCertStore* store, std::string const& host, uint16_t flags) { +SSL* SSL::client(Logger* logger, SSLEntropy*, SSLCertStore* store, + std::string const& host, uint16_t flags) { std::unique_ptr ret(new SSLClientImpl(logger, flags)); if (!ret->setup(store, host)) return nullptr; return ret.release(); -- cgit v1.2.3-70-g09d2