diff --git a/cli-kex.c b/cli-kex.c index 077fec9..936b95c 100644 --- a/cli-kex.c +++ b/cli-kex.c @@ -186,7 +186,7 @@ static void ask_to_confirm(unsigned char* keyblob, unsigned int keybloblen, char* fp = NULL; FILE *tty = NULL; - char response = 'z'; + int response = 'z'; fp = sign_key_fingerprint(keyblob, keybloblen); if (cli_opts.always_accept_key) { diff --git a/cli-session.c b/cli-session.c index a93d192..31c9f02 100644 --- a/cli-session.c +++ b/cli-session.c @@ -361,9 +361,10 @@ static void cli_session_cleanup(void) { /* Set std{in,out,err} back to non-blocking - busybox ash dies nastily if * we don't revert the flags */ - fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags); - fcntl(cli_ses.stdoutcopy, F_SETFL, cli_ses.stdoutflags); - fcntl(cli_ses.stderrcopy, F_SETFL, cli_ses.stderrflags); + /* Ignore return value since there's nothing we can do */ + (void)fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags); + (void)fcntl(cli_ses.stdoutcopy, F_SETFL, cli_ses.stdoutflags); + (void)fcntl(cli_ses.stderrcopy, F_SETFL, cli_ses.stderrflags); cli_tty_cleanup(); diff --git a/svr-kex.c b/svr-kex.c index 96f4508..f3828aa 100644 --- a/svr-kex.c +++ b/svr-kex.c @@ -138,7 +138,7 @@ static void svr_ensure_hostkey() { break; #endif default: - (void)0; + dropbear_assert(0); } if (readhostkey(fn, svr_opts.hostkey, &type) == DROPBEAR_SUCCESS) { diff --git a/svr-x11fwd.c b/svr-x11fwd.c index 2af4141..cf213e8 100644 --- a/svr-x11fwd.c +++ b/svr-x11fwd.c @@ -119,7 +119,7 @@ fail: /* cleanup */ m_free(chansess->x11authprot); m_free(chansess->x11authcookie); - close(fd); + m_close(fd); return DROPBEAR_FAILURE; }