diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-02-14 23:09:28 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-02-14 23:09:28 +0800 |
commit | 1700987bfca9442267eb70f4833b12c2d1168884 (patch) | |
tree | 25da591f8ae423dc27bc40dd88091e19204d4b32 | |
parent | a1aa16152737421a236653242e76970d9d8c4f90 (diff) |
fix compile warnings
-rw-r--r-- | svr-chansession.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/svr-chansession.c b/svr-chansession.c index f26a6da..5542ad1 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -53,7 +53,7 @@ static void sesssigchild_handler(int val); 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 @@ const struct ChanType svrchansess = { /* 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 @@ void svr_chansess_checksignal(void) { * 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 @@ static void addchildpid(struct ChanSess *chansess, pid_t pid) { /* 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 |