diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-06-22 16:07:46 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-22 16:07:46 +0200 |
commit | 4118aaaa32c1b6547b8846633d3586f18c9ee0f9 (patch) | |
tree | daa7cfa2d4b2a37eb750c6350694ca1ac62b4f78 /Applications/Terminal | |
parent | 1277d583ef32c8931dc51635a4b6cd7a96f737ed (diff) | |
download | serenity-4118aaaa32c1b6547b8846633d3586f18c9ee0f9.zip |
Terminal: Fix compiler warnings.
Diffstat (limited to 'Applications/Terminal')
-rw-r--r-- | Applications/Terminal/Terminal.cpp | 2 | ||||
-rw-r--r-- | Applications/Terminal/main.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
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<char**>(args), const_cast<char**>(envs)); if (rc < 0) { perror("execve"); exit(1); |