aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-03-05 19:39:36 +0100
committerGitHub <noreply@github.com>2022-03-05 19:39:36 +0100
commitd557a4557100e3ab48a504dafcf53f544196595c (patch)
tree2440337b15c779ef5701d6d0830e24b7ac5cf689 /src/nvim/getchar.c
parent2de4d3c7ac0216b9c2f268116b4dd09a38663b7d (diff)
parentfff527b88de91b88db95143c470c3e9007dd443e (diff)
downloadrneovim-d557a4557100e3ab48a504dafcf53f544196595c.tar.gz
rneovim-d557a4557100e3ab48a504dafcf53f544196595c.tar.bz2
rneovim-d557a4557100e3ab48a504dafcf53f544196595c.zip
Merge pull request #17538 from dundargoc/refactor/bugprone-signed-char-misuse
refactor: fix clang-tidy bugprone-signed-char-misuse warnings
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 8426cdb98c..22d957d03d 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -1907,9 +1907,6 @@ static int handle_mapping(int *keylenp, bool *timedout, int *mapdepth)
// complete match
if (keylen >= 0 && keylen <= typebuf.tb_len) {
char_u *map_str = NULL;
- int save_m_expr;
- int save_m_noremap;
- int save_m_silent;
// Write chars to script file(s).
// Note: :lmap mappings are written *after* being applied. #5658
@@ -1946,9 +1943,9 @@ static int handle_mapping(int *keylenp, bool *timedout, int *mapdepth)
// Copy the values from *mp that are used, because evaluating the
// expression may invoke a function that redefines the mapping, thereby
// making *mp invalid.
- save_m_expr = mp->m_expr;
- save_m_noremap = mp->m_noremap;
- save_m_silent = mp->m_silent;
+ char save_m_expr = mp->m_expr;
+ int save_m_noremap = mp->m_noremap;
+ char save_m_silent = mp->m_silent;
char_u *save_m_keys = NULL; // only saved when needed
char_u *save_m_str = NULL; // only saved when needed
LuaRef save_m_luaref = mp->m_luaref;
@@ -2661,9 +2658,9 @@ int fix_input_buffer(char_u *buf, int len)
/// @param[in] orig_rhs_len `strlen` of orig_rhs.
/// @param[in] cpo_flags See param docs for @ref replace_termcodes.
/// @param[out] mapargs MapArguments struct holding the replaced strings.
-void set_maparg_lhs_rhs(const char_u *orig_lhs, const size_t orig_lhs_len,
- const char_u *orig_rhs, const size_t orig_rhs_len,
- LuaRef rhs_lua, int cpo_flags, MapArguments *mapargs)
+void set_maparg_lhs_rhs(const char_u *orig_lhs, const size_t orig_lhs_len, const char_u *orig_rhs,
+ const size_t orig_rhs_len, LuaRef rhs_lua, int cpo_flags,
+ MapArguments *mapargs)
{
char_u *lhs_buf = NULL;
char_u *rhs_buf = NULL;
@@ -3988,7 +3985,7 @@ bool check_abbr(int c, char_u *ptr, int col, int mincol)
/// special characters.
///
/// @param c NUL or typed character for abbreviation
-static char_u *eval_map_expr(mapblock_T *mp, int c)
+static char_u *eval_map_expr(mapblock_T *mp, int c)
{
char_u *res;
char_u *p = NULL;