diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-10-21 14:47:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 20:47:44 +0800 |
commit | 784e498c4a9c1f03266ced5ec3f55c3a6c94b80d (patch) | |
tree | 55f79bf7e309d522a76f6efe0cb3ed631340f431 /src/nvim/eval.c | |
parent | e554f5c545b9ee1195d617b3ac21f24829330a31 (diff) | |
download | rneovim-784e498c4a9c1f03266ced5ec3f55c3a6c94b80d.tar.gz rneovim-784e498c4a9c1f03266ced5ec3f55c3a6c94b80d.tar.bz2 rneovim-784e498c4a9c1f03266ced5ec3f55c3a6c94b80d.zip |
refactor: clang-tidy fixes to silence clangd warning (#20683)
* refactor: readability-uppercase-literal-suffix
* refactor: readability-named-parameter
* refactor: bugprone-suspicious-string-compare
* refactor: google-readability-casting
* refactor: readability-redundant-control-flow
* refactor: bugprone-too-small-loop-variable
* refactor: readability-non-const-parameter
* refactor: readability-avoid-const-params-in-decls
* refactor: google-readability-todo
* refactor: readability-inconsistent-declaration-parameter-name
* refactor: bugprone-suspicious-missing-comma
* refactor: remove noisy or slow warnings
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 245ad8d9d8..69bc26b82e 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -489,7 +489,7 @@ void eval_clear(void) /// Set an internal variable to a string value. Creates the variable if it does /// not already exist. -void set_internal_string_var(const char *name, char *value) +void set_internal_string_var(const char *name, char *value) // NOLINT(readability-non-const-parameter) FUNC_ATTR_NONNULL_ARG(1) { typval_T tv = { @@ -4225,11 +4225,11 @@ bool garbage_collect(bool testing) // history items (ShaDa additional elements) if (p_hi) { - for (uint8_t i = 0; i < HIST_COUNT; i++) { + for (HistoryType i = 0; i < HIST_COUNT; i++) { const void *iter = NULL; do { histentry_T hist; - iter = hist_iter(iter, i, false, &hist); + iter = hist_iter(iter, (uint8_t)i, false, &hist); if (hist.hisstr != NULL) { ABORTING(set_ref_list)(hist.additional_elements, copyID); } @@ -8311,7 +8311,7 @@ repeat: /// "flags" can be "g" to do a global substitute. /// /// @return an allocated string, NULL for error. -char *do_string_sub(char *str, char *pat, char *sub, typval_T *expr, char *flags) +char *do_string_sub(char *str, char *pat, char *sub, typval_T *expr, const char *flags) { int sublen; regmatch_T regmatch; |