From 4d320269ca9a45d134b4346911f136618c7b0742 Mon Sep 17 00:00:00 2001 From: verdant Date: Mon, 27 Jul 2026 20:35:23 +0800 Subject: Fix -Wstrict-prototypes warnings --- fm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fm.c b/fm.c index a4a9c3d..a395de9 100644 --- a/fm.c +++ b/fm.c @@ -217,11 +217,11 @@ void fm_draw_entries(window *window, file_list *list, size_t cursor, int top, wclear(window->win); - for (int i = top; i < bottom && i < list->count; i++) { + for (int i = top; i < bottom && (size_t)i < list->count; i++) { int y = i - top; int color = 0; - if (i == cursor) + if ((size_t)i == cursor) color = COLOR_PAIR_FM_HL; else if (list->items[i].is_dir) color = COLOR_PAIR_FM_DIR; @@ -247,7 +247,7 @@ void fm_entries_scroll(fm_info *info, int n) if (info->cursor < 0) info->cursor = 0; - if (info->cursor >= info->cur->count) + if ((size_t)info->cursor >= info->cur->count) info->cursor = info->cur->count - 1; int win_height = info->bottom - info->top; -- cgit v1.2.3