aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2015-10-14 16:51:23 +0200
committerAnders Broman <a.broman58@gmail.com>2015-12-15 08:57:40 +0000
commit862625f4303b964ac5fed324828ba20b87460610 (patch)
tree50cef7a6345689b75cf0506fc26ddfe067480be7 /ui
parent01de59202d79acc1b5d6532f8501bf7a169e9604 (diff)
qt: add init values to make clang happy.
Found by clang analyzer. Change-Id: I04598e8e9fcb716b373d4b2f707de8f263ff36b0 Reviewed-on: https://code.wireshark.org/review/11029 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/qcustomplot.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/qt/qcustomplot.cpp b/ui/qt/qcustomplot.cpp
index 93344dffd8..a6f734b1ba 100644
--- a/ui/qt/qcustomplot.cpp
+++ b/ui/qt/qcustomplot.cpp
@@ -18276,7 +18276,7 @@ double QCPBarsGroup::keyPixelOffset(const QCPBars *bars, double keyCoord)
if (index >= 0)
{
int startIndex;
- double lowerPixelWidth, upperPixelWidth;
+ double lowerPixelWidth = 0, upperPixelWidth = 0;
if (baseBars.size() % 2 == 1 && index == (baseBars.size()-1)/2) // is center bar (int division on purpose)
{
return result;
@@ -18914,7 +18914,7 @@ QPolygonF QCPBars::getBarPolygon(double key, double value) const
if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return QPolygonF(); }
QPolygonF result;
- double lowerPixelWidth, upperPixelWidth;
+ double lowerPixelWidth = 0, upperPixelWidth = 0;
getPixelWidth(key, lowerPixelWidth, upperPixelWidth);
double base = getStackedBaseValue(key, value >= 0);
double basePixel = valueAxis->coordToPixel(base);
@@ -19090,7 +19090,7 @@ QCPRange QCPBars::getKeyRange(bool &foundRange, SignDomain inSignDomain) const
// determine exact range of bars by including bar width and barsgroup offset:
if (haveLower && mKeyAxis)
{
- double lowerPixelWidth, upperPixelWidth, keyPixel;
+ double lowerPixelWidth, upperPixelWidth = 0, keyPixel;
getPixelWidth(range.lower, lowerPixelWidth, upperPixelWidth);
keyPixel = mKeyAxis.data()->coordToPixel(range.lower) + lowerPixelWidth;
if (mBarsGroup)
@@ -19099,7 +19099,7 @@ QCPRange QCPBars::getKeyRange(bool &foundRange, SignDomain inSignDomain) const
}
if (haveUpper && mKeyAxis)
{
- double lowerPixelWidth, upperPixelWidth, keyPixel;
+ double lowerPixelWidth, upperPixelWidth = 0, keyPixel;
getPixelWidth(range.upper, lowerPixelWidth, upperPixelWidth);
keyPixel = mKeyAxis.data()->coordToPixel(range.upper) + upperPixelWidth;
if (mBarsGroup)
@@ -19410,7 +19410,7 @@ double QCPStatisticalBox::selectTest(const QPointF &pos, bool onlySelectable, QV
if (mKeyAxis.data()->axisRect()->rect().contains(pos.toPoint()))
{
- double posKey, posValue;
+ double posKey = 0, posValue = 0;
pixelsToCoords(pos, posKey, posValue);
// quartile box:
QCPRange keyRange(mKey-mWidth*0.5, mKey+mWidth*0.5);
@@ -20339,7 +20339,7 @@ double QCPColorMap::selectTest(const QPointF &pos, bool onlySelectable, QVariant
if (mKeyAxis.data()->axisRect()->rect().contains(pos.toPoint()))
{
- double posKey, posValue;
+ double posKey = 0, posValue = 0;
pixelsToCoords(pos, posKey, posValue);
if (mMapData->keyRange().contains(posKey) && mMapData->valueRange().contains(posValue))
return mParentPlot->selectionTolerance()*0.99;
@@ -21334,7 +21334,7 @@ double QCPFinancial::candlestickSelectTest(const QPointF &pos, const QCPFinancia
// determine whether pos is in open-close-box:
QCPRange boxKeyRange(it.value().key-mWidth*0.5, it.value().key+mWidth*0.5);
QCPRange boxValueRange(it.value().close, it.value().open);
- double posKey, posValue;
+ double posKey = 0, posValue = 0;
pixelsToCoords(pos, posKey, posValue);
if (boxKeyRange.contains(posKey) && boxValueRange.contains(posValue)) // is in open-close-box
{
@@ -21358,7 +21358,7 @@ double QCPFinancial::candlestickSelectTest(const QPointF &pos, const QCPFinancia
// determine whether pos is in open-close-box:
QCPRange boxKeyRange(it.value().key-mWidth*0.5, it.value().key+mWidth*0.5);
QCPRange boxValueRange(it.value().close, it.value().open);
- double posKey, posValue;
+ double posKey = 0, posValue = 0;
pixelsToCoords(pos, posKey, posValue);
if (boxKeyRange.contains(posKey) && boxValueRange.contains(posValue)) // is in open-close-box
{