vim-patch:8.1.1312: Coverity warning for using uninitialized variable

Problem:    Coverity warning for using uninitialized variable.
Solution:   Clear exarg_T.
4ca41534b7
This commit is contained in:
Jan Edmund Lazo
2019-05-09 20:43:04 -04:00
parent 92f39762af
commit c82c5d7570
2 changed files with 10 additions and 9 deletions

View File

@@ -1298,7 +1298,12 @@ void dialog_changed(buf_T *buf, bool checkall)
{
char_u buff[DIALOG_MSG_SIZE];
int ret;
exarg_T ea;
// Init ea pseudo-structure, this is needed for the check_overwrite()
// function.
exarg_T ea = {
.append = false,
.forceit = false,
};
dialog_msg(buff, _("Save changes to \"%s\"?"), buf->b_fname);
if (checkall) {
@@ -1307,10 +1312,6 @@ void dialog_changed(buf_T *buf, bool checkall)
ret = vim_dialog_yesnocancel(VIM_QUESTION, NULL, buff, 1);
}
// Init ea pseudo-structure, this is needed for the check_overwrite()
// function.
ea.append = ea.forceit = false;
if (ret == VIM_YES) {
if (buf->b_fname != NULL
&& check_overwrite(&ea,