PVS/V1037: redundant switch-case branches #10519

Suppress the warning, the branches are semantically different.
This commit is contained in:
Ihor Antonov 2019-07-17 18:20:06 -04:00 committed by Justin M. Keyes
parent 4fc91fe365
commit 452ec4ed31

View File

@ -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;
}