diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-09-14 13:07:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 04:07:08 -0700 |
commit | b8cce77702777bb876b2cef7e28662cf4539265e (patch) | |
tree | 70424a5319204875e76dbfddb72c931635bd959d /src/nvim/ex_docmd.c | |
parent | 6ed43f8f1caad702f9590d174c5ec142f3d85b18 (diff) | |
download | rneovim-b8cce77702777bb876b2cef7e28662cf4539265e.tar.gz rneovim-b8cce77702777bb876b2cef7e28662cf4539265e.tar.bz2 rneovim-b8cce77702777bb876b2cef7e28662cf4539265e.zip |
fix: "redundant cast to the same type" #15662
Apply "redundant cast to the same type" fix from clangd.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index a9852a78e6..4280a6a2c6 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -2644,7 +2644,7 @@ static char_u *find_command(exarg_T *eap, int *full) const int c1 = eap->cmd[0]; const int c2 = len == 1 ? NUL : eap->cmd[1]; - if (command_count != (int)CMD_SIZE) { + if (command_count != CMD_SIZE) { iemsg((char *)_("E943: Command table needs to be updated, run 'make'")); getout(1); } @@ -2659,7 +2659,7 @@ static char_u *find_command(exarg_T *eap, int *full) eap->cmdidx = CMD_bang; } - for (; (int)eap->cmdidx < (int)CMD_SIZE; + for (; (int)eap->cmdidx < CMD_SIZE; eap->cmdidx = (cmdidx_T)((int)eap->cmdidx + 1)) { if (STRNCMP(cmdnames[(int)eap->cmdidx].cmd_name, (char *)eap->cmd, (size_t)len) == 0) { @@ -2869,7 +2869,7 @@ int cmd_exists(const char *const name) for (int i = 0; i < (int)ARRAY_SIZE(cmdmods); i++) { int j; for (j = 0; name[j] != NUL; j++) { - if (name[j] != (char)cmdmods[i].name[j]) { + if (name[j] != cmdmods[i].name[j]) { break; } } @@ -2989,7 +2989,7 @@ const char * set_one_cmd_context(expand_T *xp, const char *buff) xp->xp_context = EXPAND_UNSUCCESSFUL; return NULL; } - for (ea.cmdidx = (cmdidx_T)0; (int)ea.cmdidx < (int)CMD_SIZE; + for (ea.cmdidx = (cmdidx_T)0; (int)ea.cmdidx < CMD_SIZE; ea.cmdidx = (cmdidx_T)((int)ea.cmdidx + 1)) { if (STRNCMP(cmdnames[(int)ea.cmdidx].cmd_name, cmd, len) == 0) { break; @@ -5143,7 +5143,7 @@ static int check_more(int message, bool forceit) */ char_u *get_command_name(expand_T *xp, int idx) { - if (idx >= (int)CMD_SIZE) { + if (idx >= CMD_SIZE) { return get_user_command_name(idx); } return cmdnames[idx].cmd_name; @@ -6239,7 +6239,7 @@ static void do_ucmd(exarg_T *eap) static char_u *get_user_command_name(int idx) { - return get_user_commands(NULL, idx - (int)CMD_SIZE); + return get_user_commands(NULL, idx - CMD_SIZE); } /* * Function given to ExpandGeneric() to obtain the list of user address type names. |