aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-02-20 17:13:44 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-02-21 10:51:07 +0100
commit5a590dfb5f0c0593dee7d138b8e8ee42ab093406 (patch)
treec24401ba735350f17c6b7d118df2cd4ef57d8b47 /examples
parent881e1b47855fefa8e9bca4e5f9fba4b464707ceb (diff)
downloadlibssh-5a590dfb5f0c0593dee7d138b8e8ee42ab093406.tar.gz
libssh-5a590dfb5f0c0593dee7d138b8e8ee42ab093406.tar.xz
libssh-5a590dfb5f0c0593dee7d138b8e8ee42ab093406.zip
examples: Fix unused parameter warnings in sshd_direct-tcpip
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/sshd_direct-tcpip.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/examples/sshd_direct-tcpip.c b/examples/sshd_direct-tcpip.c
index c2805115..23f59a4b 100644
--- a/examples/sshd_direct-tcpip.c
+++ b/examples/sshd_direct-tcpip.c
@@ -178,7 +178,9 @@ static ssh_channel new_session_channel(ssh_session session, void *userdata) {
return NULL;
}
-static void stack_socket_close(ssh_session session, struct event_fd_data_struct *event_fd_data) {
+static void stack_socket_close(UNUSED_PARAM(ssh_session session),
+ struct event_fd_data_struct *event_fd_data)
+{
if (event_fd_data->stacked != 1) {
_ssh_log(SSH_LOG_FUNCTIONS, "=== stack_socket_close", "Closing fd = %d sockets_cnt = %d", *event_fd_data->p_fd, sockets_cnt);
event_fd_data->stacked = 1;
@@ -237,7 +239,13 @@ static void my_channel_exit_status_function(ssh_session session, ssh_channel cha
_ssh_log(SSH_LOG_PROTOCOL, "=== my_channel_exit_status_function", "Got exit status %d on channel %d:%d fd = %d.", exit_status, channel->local_channel, channel->remote_channel, *event_fd_data->p_fd);
}
-static int my_channel_data_function(ssh_session session, ssh_channel channel, void *data, uint32_t len, int is_stderr, void *userdata) {
+static int my_channel_data_function(ssh_session session,
+ ssh_channel channel,
+ void *data,
+ uint32_t len,
+ UNUSED_PARAM(int is_stderr),
+ void *userdata)
+{
int i = 0;
struct event_fd_data_struct *event_fd_data = (struct event_fd_data_struct *)userdata;
@@ -259,7 +267,10 @@ static int my_channel_data_function(ssh_session session, ssh_channel channel, vo
return i;
}
-static int my_fd_data_function(socket_t fd, int revents, void *userdata) {
+static int my_fd_data_function(UNUSED_PARAM(socket_t fd),
+ int revents,
+ void *userdata)
+{
struct event_fd_data_struct *event_fd_data = (struct event_fd_data_struct *)userdata;
ssh_channel channel = event_fd_data->channel;
ssh_session session;