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

@@ -354,7 +354,7 @@ char *strcase_save(const char *const orig, bool upper)
int l = utf_ptr2len((const char_u *)p);
if (c == 0) {
// overlong sequence, use only the first byte
c = *p;
c = (char_u)(*p);
l = 1;
}
int uc = upper ? mb_toupper(c) : mb_tolower(c);