]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix off_t to uint_t comparison warning
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 2 Jul 2021 15:04:02 +0000 (20:34 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 2 Jul 2021 15:04:02 +0000 (20:34 +0530)
The man page says:

"blkcnt_t and off_t shall be signed integer types."

https://man7.org/linux/man-pages/man0/sys_types.h.0p.html

src/nnn.c

index fcea6c97c66ebcfd43f157494d035f2ff34c2b61..82e199c5bf9d8f2e6cc582049948aacef53fa52d 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3556,7 +3556,7 @@ static wchar_t *unescape(const char *str, uint_t maxcols)
        return wbuf;
 }
 
-static off_t get_size(off_t size, off_t *pval, uint_t comp)
+static off_t get_size(off_t size, off_t *pval, int comp)
 {
        off_t rem = *pval;
        off_t quo = rem / 10;