1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:07:34 +00:00

Terminal: Fix compiler warnings.

This commit is contained in:
Andreas Kling 2019-06-22 16:07:46 +02:00
parent 1277d583ef
commit 4118aaaa32
2 changed files with 4 additions and 4 deletions

View file

@ -290,7 +290,7 @@ void Terminal::escape$r(const ParamVector& params)
top = params[0]; top = params[0];
if (params.size() >= 2) if (params.size() >= 2)
bottom = params[1]; 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); dbgprintf("Error: escape$r: scrolling region invalid: %u-%u\n", top, bottom);
return; return;
} }

View file

@ -70,9 +70,9 @@ static void make_shell(int ptm_fd)
perror("ioctl(TIOCSCTTY)"); perror("ioctl(TIOCSCTTY)");
exit(1); exit(1);
} }
char* args[] = { "/bin/Shell", nullptr }; const char* args[] = { "/bin/Shell", nullptr };
char* envs[] = { "TERM=xterm", "PATH=/bin:/usr/bin:/usr/local/bin", nullptr }; const char* envs[] = { "TERM=xterm", "PATH=/bin:/usr/bin:/usr/local/bin", nullptr };
rc = execve("/bin/Shell", args, envs); rc = execve("/bin/Shell", const_cast<char**>(args), const_cast<char**>(envs));
if (rc < 0) { if (rc < 0) {
perror("execve"); perror("execve");
exit(1); exit(1);