Initialize out-variables
QSplitterPrivate::getRange might return early, and then the variables will contain garbage. Fixes warning from clang static analyzer. Change-Id: I0081ad9847f158da4440b945ba2db7e7f5d4780b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 4f24e1e9b1230b97a45c6aab366fecd29795e885) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
7898f6a6aa
commit
5d323919e1
@ -1404,10 +1404,10 @@ void QSplitter::moveSplitter(int pos, int index)
|
||||
{
|
||||
Q_D(QSplitter);
|
||||
QSplitterLayoutStruct *s = d->list.at(index);
|
||||
int farMin;
|
||||
int min;
|
||||
int max;
|
||||
int farMax;
|
||||
int farMin = 0;
|
||||
int min = 0;
|
||||
int max = 0;
|
||||
int farMax = 0;
|
||||
|
||||
#ifdef QSPLITTER_DEBUG
|
||||
int debugp = pos;
|
||||
@ -1471,7 +1471,10 @@ void QSplitter::getRange(int index, int *min, int *max) const
|
||||
int QSplitter::closestLegalPosition(int pos, int index)
|
||||
{
|
||||
Q_D(QSplitter);
|
||||
int x, i, n, u;
|
||||
int x = 0;
|
||||
int i = 0;
|
||||
int n = 0;
|
||||
int u = 0;
|
||||
return d->adjustPos(pos, index, &u, &n, &i, &x);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user