Skip to content

Commit

Permalink
build: treat clang-tidy warnings as errors (neovim#22238)
Browse files Browse the repository at this point in the history
  • Loading branch information
dundargoc authored Feb 12, 2023
1 parent f573fcb commit 4763870
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
WarningsAsErrors: '*'
Checks: >
-*,
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -3410,7 +3410,7 @@ static int eval_index(char **arg, typval_T *rettv, int evaluate, int verbose)
if (n1 >= len || n2 < 0 || n1 > n2) {
v = NULL;
} else {
v = xmemdupz(s + n1, (size_t)(n2 - n1 + 1));
v = xmemdupz(s + n1, (size_t)n2 - (size_t)n1 + 1);
}
} else {
// The resulting variable is a string of a single
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ int do_record(int c)
dict_T *dict = get_v_event(&save_v_event);

// The recorded text contents.
char *p = (char *)get_recorded();
char *p = get_recorded();
if (p != NULL) {
// Remove escaping for K_SPECIAL in multi-byte chars.
vim_unescape_ks(p);
Expand Down

0 comments on commit 4763870

Please sign in to comment.