frontend: fix all compiler warnings

This commit is contained in:
2024-12-13 17:20:45 +00:00
parent 97aaffd166
commit b3a9943fe5
14 changed files with 68 additions and 72 deletions

View File

@@ -33,7 +33,7 @@ void load_buf_from_history(struct line_ed *ed)
{
b_string *cur = (b_string *)b_array_at(ed->l_history, ed->l_history_pos);
size_t len
= MIN(ed->l_buf_end - ed->l_buf - 1,
= MIN((size_t)(ed->l_buf_end - ed->l_buf - 1),
b_string_get_size(cur, B_STRLEN_NORMAL));
memcpy(ed->l_buf, b_string_ptr(cur), len);
@@ -57,7 +57,7 @@ void load_buf_from_history(struct line_ed *ed)
const char *last_history_line(struct line_ed *ed)
{
unsigned long nlines = b_array_size(ed->l_history);
size_t nlines = b_array_size(ed->l_history);
if (nlines < 2) {
return NULL;
}