mirror of
https://github.com/neovim/neovim.git
synced 2025-10-10 11:56:30 +00:00
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:

committed by
Justin M. Keyes

parent
4d0ef9a6b9
commit
bb674e0fcd
@@ -3219,23 +3219,11 @@ get_address (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!skip) {
|
if (!skip) {
|
||||||
/*
|
// When search follows another address, start from there.
|
||||||
* When search follows another address, start from
|
pos.lnum = (lnum != MAXLNUM) ? lnum : curwin->w_cursor.lnum;
|
||||||
* there.
|
// Start the search just like for the above do_search().
|
||||||
*/
|
pos.col = (*cmd != '?') ? MAXCOL : 0;
|
||||||
if (lnum != MAXLNUM)
|
pos.coladd = 0;
|
||||||
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;
|
|
||||||
if (searchit(curwin, curbuf, &pos,
|
if (searchit(curwin, curbuf, &pos,
|
||||||
*cmd == '?' ? BACKWARD : FORWARD,
|
*cmd == '?' ? BACKWARD : FORWARD,
|
||||||
(char_u *)"", 1L, SEARCH_MSG,
|
(char_u *)"", 1L, SEARCH_MSG,
|
||||||
|
Reference in New Issue
Block a user