refactor(PVS/V1048): remove duplicated assignments (#21873)

This commit is contained in:
Lucas Merritt
2023-03-24 22:11:14 -06:00
committed by GitHub
parent aab4443bb9
commit 063e93864a
5 changed files with 2 additions and 7 deletions

View File

@@ -7581,7 +7581,7 @@ static void f_settagstack(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
// third argument: action - 'a' for append and 'r' for replace.
// default is to replace the stack.
if (argvars[2].v_type == VAR_UNKNOWN) {
action = 'r';
// action = 'r';
} else if (argvars[2].v_type == VAR_STRING) {
const char *actstr;
actstr = tv_get_string_chk(&argvars[2]);

View File

@@ -2890,7 +2890,7 @@ static int process_next_cpt_value(ins_compl_next_state_T *st, int *compl_type_ar
status = INS_COMPL_CPT_END;
} else {
if (ctrl_x_mode_line_or_eval()) {
compl_type = -1;
// compl_type = -1;
} else if (*st->e_cpt == 'k' || *st->e_cpt == 's') {
if (*st->e_cpt == 'k') {
compl_type = CTRL_X_DICTIONARY;
@@ -2912,8 +2912,6 @@ static int process_next_cpt_value(ins_compl_next_state_T *st, int *compl_type_ar
vim_snprintf(IObuff, IOSIZE, "%s", _("Scanning tags."));
(void)msg_trunc_attr(IObuff, true, HL_ATTR(HLF_R));
}
} else {
compl_type = -1;
}
// in any case e_cpt is advanced to the next entry

View File

@@ -2375,7 +2375,6 @@ static int path_to_absolute(const char *fname, char *buf, size_t len, int force)
end_of_path = p + 1;
} else {
relative_directory[0] = NUL;
end_of_path = (char *)fname;
}
if (FAIL == path_full_dir_name(relative_directory, buf, len)) {

View File

@@ -2238,7 +2238,6 @@ collection:
}
// Failed to recognize a character class. Use the simple
// version that turns [abc] into 'a' OR 'b' OR 'c'
startc = -1;
negated = false;
if (*regparse == '^') { // negated range
negated = true;

View File

@@ -3602,7 +3602,6 @@ shada_read_next_item_start:
ret = spm_ret;
goto shada_read_next_item_error;
}
ret = kSDReadStatusMalformed;
entry->data = sd_default_values[type_u64].data;
switch ((ShadaEntryType)type_u64) {
case kSDItemHeader: