Mercurial > octave
changeset 26557:1dcbdc61a518 stable
Fix garbage return value found by clang static analysis (bug #55440).
* History.cpp (HistoryScrollFile::startOfLine): Initialize variable "res" so
that something valid is always returned.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 16 Jan 2019 10:40:51 -0800 |
parents | 275a4d4ab56c |
children | 434c0163d7be |
files | libgui/qterminal/libqterminal/unix/History.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/qterminal/libqterminal/unix/History.cpp Wed Jan 16 10:13:07 2019 -0800 +++ b/libgui/qterminal/libqterminal/unix/History.cpp Wed Jan 16 10:40:51 2019 -0800 @@ -245,7 +245,7 @@ if (!index.isMapped()) index.map(); - int res; + int res = 0; index.get((unsigned char*)&res,sizeof(int),(lineno-1)*sizeof(int)); return res; }