aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cmd/tls_server.cpp4
-rw-r--r--src/cmd/tls_server_asio.cpp5
-rw-r--r--src/tests/test_transform.cpp2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/cmd/tls_server.cpp b/src/cmd/tls_server.cpp
index 980a68d09..9db250859 100644
--- a/src/cmd/tls_server.cpp
+++ b/src/cmd/tls_server.cpp
@@ -115,7 +115,7 @@ void stream_socket_write(int sockfd, const byte buf[], size_t length)
}
}
-void alert_received(TLS::Alert alert, const byte buf[], size_t buf_size)
+void alert_received(TLS::Alert alert, const byte[], size_t)
{
std::cout << "Alert: " << alert.type_string() << "\n";
}
@@ -192,7 +192,7 @@ int tls_server_main(int argc, char* argv[])
{
for(size_t i = 0; i != input_len; ++i)
{
- char c = (char)input[i];
+ const char c = static_cast<char>(input[i]);
s += c;
if(c == '\n')
{
diff --git a/src/cmd/tls_server_asio.cpp b/src/cmd/tls_server_asio.cpp
index b41f99391..f0847b9e0 100644
--- a/src/cmd/tls_server_asio.cpp
+++ b/src/cmd/tls_server_asio.cpp
@@ -140,7 +140,7 @@ class tls_server_session : public boost::enable_shared_from_this<tls_server_sess
}
}
- void tls_alert_cb(Botan::TLS::Alert alert, const byte buf[], size_t buf_len)
+ void tls_alert_cb(Botan::TLS::Alert alert, const byte[], size_t)
{
if(alert.type() == Botan::TLS::Alert::CLOSE_NOTIFY)
{
@@ -173,7 +173,8 @@ class tls_server_session : public boost::enable_shared_from_this<tls_server_sess
out += "Content-Type: text/html\r\n";
out += "\r\n";
out += "<html><body>Greets. You said: ";
- out += std::string((const char*)&m_client_data[0], m_client_data.size());
+ out += std::string(reinterpret_cast<const char*>(&m_client_data[0]),
+ m_client_data.size());
out += "</body></html>\r\n\r\n";
m_tls.send(out);
diff --git a/src/tests/test_transform.cpp b/src/tests/test_transform.cpp
index df13af8f4..737eb2f33 100644
--- a/src/tests/test_transform.cpp
+++ b/src/tests/test_transform.cpp
@@ -16,7 +16,7 @@ Transformation* get_transform(const std::string& algo)
secure_vector<byte> transform_test(const std::string& algo,
const secure_vector<byte>& nonce,
- const secure_vector<byte>& key,
+ const secure_vector<byte>& /*key*/,
const secure_vector<byte>& in)
{
std::unique_ptr<Transformation> transform(get_transform(algo));