coverity/13810: Unitialized scalar variable: HI.

Problem    : Unitialized scalar variable @ 3239.
Diagnostic : Harmless issue.
Rationale  : It's true pos.coladd is not initialized when calling
             searchit(). But that's no problem, as coladd is only set in
             that function.
Resolution : Initialize variable to 0.
This commit is contained in:
Eliseo Martínez
2015-01-27 18:11:06 +01:00
committed by Justin M. Keyes
parent 4d0ef9a6b9
commit bb674e0fcd

View File

@@ -3219,27 +3219,15 @@ get_address (
}
if (!skip) {
/*
* When search follows another address, start from
* there.
*/
if (lnum != MAXLNUM)
pos.lnum = lnum;
else
pos.lnum = curwin->w_cursor.lnum;
/*
* Start the search just like for the above
* do_search().
*/
if (*cmd != '?')
pos.col = MAXCOL;
else
pos.col = 0;
// When search follows another address, start from there.
pos.lnum = (lnum != MAXLNUM) ? lnum : curwin->w_cursor.lnum;
// Start the search just like for the above do_search().
pos.col = (*cmd != '?') ? MAXCOL : 0;
pos.coladd = 0;
if (searchit(curwin, curbuf, &pos,
*cmd == '?' ? BACKWARD : FORWARD,
(char_u *)"", 1L, SEARCH_MSG,
i, (linenr_T)0, NULL) != FAIL)
*cmd == '?' ? BACKWARD : FORWARD,
(char_u *)"", 1L, SEARCH_MSG,
i, (linenr_T)0, NULL) != FAIL)
lnum = pos.lnum;
else {
cmd = NULL;