Userspace: Compile programs and libraries with -Wall -Wextra -Werror

This commit is contained in:
2024-09-26 15:20:07 +03:00
parent e6ed5a388d
commit cea6dedccc
6 changed files with 8 additions and 11 deletions

View File

@@ -222,13 +222,13 @@ bool Terminal::read_shell()
}
// find the next ansi escape code or end of buffer
size_t non_ansi_end = i;
ssize_t non_ansi_end = i;
while (non_ansi_end < nread && buffer[non_ansi_end] != '\e')
non_ansi_end++;
// we only need to process maximum of `rows()` newlines.
// anything before that would get overwritten anyway
size_t start = non_ansi_end;
ssize_t start = non_ansi_end;
size_t newline_count = 0;
while (start > i && newline_count < rows())
newline_count += (buffer[--start] == '\n');