From 30fb03e7265b68624ded6a6e3658353be012f265 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Thu, 21 Mar 2019 21:09:55 +0530 Subject: Fix lint warnings --- src/nnn.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/nnn.c b/src/nnn.c index 5265217..8ff177d 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -888,7 +888,7 @@ static void resetcpind(void) /* Initialize curses mode */ static bool initcurses(void) { - int i; + short i; if (cfg.picker) { if (!newterm(NULL, stderr, stdin)) { @@ -1385,8 +1385,12 @@ static int entrycmp(const void *va, const void *vb) } /* Do the actual sorting */ - if (cfg.mtimeorder) - return pb->t - pa->t; + if (cfg.mtimeorder) { + if (pb->t >= pa->t) + return (int)(pb->t - pa->t); + + return -1; + } if (cfg.sizeorder) { if (pb->size > pa->size) @@ -2311,9 +2315,9 @@ static size_t get_fs_info(const char *path, bool type) return 0; if (type == CAPACITY) - return svb.f_blocks << ffs(svb.f_bsize >> 1); + return svb.f_blocks << ffs((int)(svb.f_bsize >> 1)); - return svb.f_bavail << ffs(svb.f_frsize >> 1); + return svb.f_bavail << ffs((int)(svb.f_frsize >> 1)); } static bool show_mediainfo(const char *fpath, const char *arg) -- cgit v1.2.3-70-g09d2