cleanup: Adapt type and cast to get ride of warnings

This commit is contained in:
Michael Vetter
2026-02-19 13:00:41 +01:00
parent 6e61383e97
commit 1120170ef7
4 changed files with 10 additions and 10 deletions

View File

@@ -366,7 +366,7 @@ _inp_write(char* line, int offset)
if (line[i] == '\n') {
c = retc;
ch_len = wctomb(retc, L'\u23ce'); /* return symbol */
if (ch_len == -1) { /* not representable */
if (ch_len == (size_t)-1) { /* not representable */
retc[0] = '\\';
ch_len = 1;
}

View File

@@ -1871,7 +1871,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
curr_ch++;
continue;
}
int offset = 0;
size_t offset = 0;
while (offset < ch_len) {
word[wordi++] = curr_ch[offset++];
}
@@ -1880,7 +1880,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
word[wordi] = '\0';
wordlen = utf8_display_len(word);
int curx = getcurx(win);
size_t curx = (size_t)getcurx(win);
int cury;
size_t maxx = getmaxx(win);
@@ -1892,7 +1892,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
if (wordlen > linelen) {
gchar* word_ch = g_utf8_offset_to_pointer(word, 0);
while (*word_ch != '\0') {
curx = getcurx(win);
curx = (size_t)getcurx(win);
cury = getcury(win);
gboolean firstline = cury == starty;
@@ -1913,7 +1913,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
// newline and print word
} else {
waddch(win, '\n');
curx = getcurx(win);
curx = (size_t)getcurx(win);
cury = getcury(win);
gboolean firstline = cury == starty;
@@ -1928,7 +1928,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
// no wrap required
} else {
curx = getcurx(win);
curx = (size_t)getcurx(win);
cury = getcury(win);
gboolean firstline = cury == starty;