# HG changeset patch # User Matt Johnston # Date 1518620968 -28800 # Node ID da3bed08607b4f11c42825d93cc96eb3484997b5 # Parent 0c16b4ccbd5483278dd1f0df3a262b215708e06e fix compile warnings diff -r 0c16b4ccbd54 -r da3bed08607b svr-chansession.c --- 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