From 4118aaaa32c1b6547b8846633d3586f18c9ee0f9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 22 Jun 2019 16:07:46 +0200 Subject: Terminal: Fix compiler warnings. --- Applications/Terminal/Terminal.cpp | 2 +- Applications/Terminal/main.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Applications/Terminal') diff --git a/Applications/Terminal/Terminal.cpp b/Applications/Terminal/Terminal.cpp index 3ba514fe73..45c019fab9 100644 --- a/Applications/Terminal/Terminal.cpp +++ b/Applications/Terminal/Terminal.cpp @@ -290,7 +290,7 @@ void Terminal::escape$r(const ParamVector& params) top = params[0]; if (params.size() >= 2) bottom = params[1]; - if ((bottom - top) < 2 || bottom > m_rows || top < 0) { + if ((bottom - top) < 2 || bottom > m_rows) { dbgprintf("Error: escape$r: scrolling region invalid: %u-%u\n", top, bottom); return; } diff --git a/Applications/Terminal/main.cpp b/Applications/Terminal/main.cpp index eb94315263..f46e4798ac 100644 --- a/Applications/Terminal/main.cpp +++ b/Applications/Terminal/main.cpp @@ -70,9 +70,9 @@ static void make_shell(int ptm_fd) perror("ioctl(TIOCSCTTY)"); exit(1); } - char* args[] = { "/bin/Shell", nullptr }; - char* envs[] = { "TERM=xterm", "PATH=/bin:/usr/bin:/usr/local/bin", nullptr }; - rc = execve("/bin/Shell", args, envs); + const char* args[] = { "/bin/Shell", nullptr }; + const char* envs[] = { "TERM=xterm", "PATH=/bin:/usr/bin:/usr/local/bin", nullptr }; + rc = execve("/bin/Shell", const_cast(args), const_cast(envs)); if (rc < 0) { perror("execve"); exit(1); -- cgit v1.2.3