changeset 1496:da3bed08607b

fix compile warnings
author Matt Johnston <matt@ucc.asn.au>
date Wed, 14 Feb 2018 23:09:28 +0800
parents 0c16b4ccbd54
children bf9c06b8dad9
files svr-chansession.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/svr-chansession.c	Wed Feb 14 23:06:01 2018 +0800
+++ b/svr-chansession.c	Wed Feb 14 23:09:28 2018 +0800
@@ -53,7 +53,7 @@
 static void closechansess(const struct Channel *channel);
 static int newchansess(struct Channel *channel);
 static void chansessionrequest(struct Channel *channel);
-static int sesscheckclose(const struct Channel *channel);
+static int sesscheckclose(struct Channel *channel);
 
 static void send_exitsignalstatus(const struct Channel *channel);
 static void send_msg_chansess_exitstatus(const struct Channel * channel,
@@ -74,7 +74,7 @@
 /* required to clear environment */
 extern char** environ;
 
-static int sesscheckclose(const struct Channel *channel) {
+static int sesscheckclose(struct Channel *channel) {
 	struct ChanSess *chansess = (struct ChanSess*)channel->typedata;
 	TRACE(("sesscheckclose, pid is %d", chansess->exit.exitpid))
 	return chansess->exit.exitpid != -1;
@@ -138,7 +138,6 @@
  * the parent when it runs. This work correctly at least in the case of a
  * single shell spawned (ie the usual case) */
 static void sesssigchild_handler(int UNUSED(dummy)) {
-	unsigned int i;
 	struct sigaction sa_chld;
 
 	const int saved_errno = errno;
@@ -905,7 +904,7 @@
 /* Clean up, drop to user privileges, set up the environment and execute
  * the command/shell. This function does not return. */
 static void execchild(const void *user_data) {
-	struct ChanSess *chansess = user_data;
+	const struct ChanSess *chansess = user_data;
 	char *usershell = NULL;
 
 	/* with uClinux we'll have vfork()ed, so don't want to overwrite the