diff options
| author | verdant <im@verdant.ee> | 2026-07-27 20:35:23 +0800 |
|---|---|---|
| committer | verdant <im@verdant.ee> | 2026-07-27 20:35:23 +0800 |
| commit | 4d320269ca9a45d134b4346911f136618c7b0742 (patch) | |
| tree | 10b684d7d4cfa0bb07fccc0ad2255cd69c344454 | |
| parent | 68fbc7276638652e314a64c100b796a777e22bf2 (diff) | |
| download | sf-4d320269ca9a45d134b4346911f136618c7b0742.tar.gz sf-4d320269ca9a45d134b4346911f136618c7b0742.zip | |
Fix -Wstrict-prototypes warnings
| -rw-r--r-- | fm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |
