]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix build break
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 9 Oct 2021 13:56:34 +0000 (19:26 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 9 Oct 2021 14:07:45 +0000 (19:37 +0530)
src/.clang-tidy
src/nnn.c

index 6a8141ab15af697053758be8c456fab3acb9694c..331e56ef1e775b21872c166febc5bb65fee1995f 100644 (file)
@@ -1,5 +1,5 @@
 ---
-Checks:          'clang-diagnostic-*,clang-analyzer-*,readability-*,modernize-*,bugprone-*,misc-*,-misc-unused-parameters,google-runtime-int,-llvm-header-guard,fuchsia-restrict-system-includes,-clang-analyzer-valist.Uninitialized,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-alpha.*,-readability-magic-numbers,-readability-braces-around-statements,-readability-function-cognitive-complexity,-readability-isolate-declaration,-bugprone-narrowing-conversions,-bugprone-reserved-identifier'
+Checks:          'clang-diagnostic-*,clang-analyzer-*,readability-*,modernize-*,bugprone-*,misc-*,-misc-unused-parameters,google-runtime-int,-llvm-header-guard,fuchsia-restrict-system-includes,-clang-analyzer-valist.Uninitialized,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-alpha.*,-readability-magic-numbers,-readability-braces-around-statements,-readability-function-cognitive-complexity,-readability-isolate-declaration,-readability-suspicious-call-argument,-bugprone-easily-swappable-parameters,-bugprone-narrowing-conversions,-bugprone-reserved-identifier'
 WarningsAsErrors: '*'
 HeaderFilterRegex: '.*(?<!lookup3.c)$'
 FormatStyle: 'file'
index 897c32f14cb837e7d513288b556c62a76b6adbb7..b06c99871ce4cc92adf2e2a79d57bc78ea9c91fe 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -7839,7 +7839,7 @@ static char *make_tmp_tree(char **paths, ssize_t entries, const char *prefix)
 
 static char *load_input(int fd, const char *path)
 {
-       ssize_t i, chunk_count = 1, chunk = 512 * 1024 /* 512 KiB chunk size */, entries = 0;
+       ssize_t i, chunk_count = 1, chunk = (ssize_t)(512 * 1024) /* 512 KiB chunk size */, entries = 0;
        char *input = malloc(sizeof(char) * chunk), *tmpdir = NULL;
        char cwd[PATH_MAX], *next;
        size_t offsets[LIST_FILES_MAX];