refactor: fix clang-tidy bugprone-signed-char-misuse warnings

Prefer to declare variables with correct type instead of explicit casts
wherever possible.
This commit is contained in:
Dundar Göc
2022-02-27 12:29:33 +01:00
parent 83fc914337
commit 4d2744ffe3
13 changed files with 24 additions and 30 deletions

View File

@@ -823,7 +823,6 @@ static void command_line_scan(mparm_T *parmp)
bool had_stdin_file = false; // found explicit "-" argument
bool had_minmin = false; // found "--" argument
int want_argument; // option argument with argument
int c;
long n;
argc--;
@@ -845,7 +844,7 @@ static void command_line_scan(mparm_T *parmp)
// Optional argument.
} else if (argv[0][0] == '-' && !had_minmin) {
want_argument = false;
c = argv[0][argv_idx++];
char c = argv[0][argv_idx++];
switch (c) {
case NUL: // "nvim -" read from stdin
if (exmode_active) {