aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIhor Antonov <ngortheone@users.noreply.github.com>2019-07-17 18:20:06 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-07-18 00:20:06 +0200
commit452ec4ed31d5d9c9ab4af9d8e686182ae11cef0c (patch)
tree707179230d8cf18aea22b6f6215cc1a0b99a7bab
parent4fc91fe365fc229928d9e3dc89a6b3b264bdd8f3 (diff)
downloadrneovim-452ec4ed31d5d9c9ab4af9d8e686182ae11cef0c.tar.gz
rneovim-452ec4ed31d5d9c9ab4af9d8e686182ae11cef0c.tar.bz2
rneovim-452ec4ed31d5d9c9ab4af9d8e686182ae11cef0c.zip
PVS/V1037: redundant switch-case branches #10519
Suppress the warning, the branches are semantically different.
-rw-r--r--src/nvim/ex_docmd.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 072f2fab40..59e6f227e4 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -1108,9 +1108,8 @@ static int current_tab_nr(tabpage_T *tab)
#define CURRENT_TAB_NR current_tab_nr(curtab)
#define LAST_TAB_NR current_tab_nr(NULL)
-/*
-* Figure out the address type for ":wincmd".
-*/
+
+/// Figure out the address type for ":wincmd".
static void get_wincmd_addr_type(char_u *arg, exarg_T *eap)
{
switch (*arg) {
@@ -1156,13 +1155,13 @@ static void get_wincmd_addr_type(char_u *arg, exarg_T *eap)
case Ctrl_I:
case 'd':
case Ctrl_D:
- /* window size or any count */
- eap->addr_type = ADDR_LINES;
+ // window size or any count
+ eap->addr_type = ADDR_LINES; // -V1037
break;
case Ctrl_HAT:
case '^':
- /* buffer number */
+ // buffer number
eap->addr_type = ADDR_BUFFERS;
break;
@@ -1177,7 +1176,7 @@ static void get_wincmd_addr_type(char_u *arg, exarg_T *eap)
case 'W':
case 'x':
case Ctrl_X:
- /* window number */
+ // window number
eap->addr_type = ADDR_WINDOWS;
break;
@@ -1192,7 +1191,7 @@ static void get_wincmd_addr_type(char_u *arg, exarg_T *eap)
case Ctrl_P:
case '=':
case CAR:
- /* no count */
+ // no count
eap->addr_type = 0;
break;
}