aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-21 21:35:04 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-21 21:35:04 -0700
commit52ee5f28c2f19ea386398436e446b23fb7a080ff (patch)
treed297d7097e411f7169123fd8ee723b571a971751 /qt-ui/profile/profilewidget2.cpp
parentc01c35ca0ca2e42f2e2ea6a4d9c6e2b2f49c57d1 (diff)
downloadsubsurface-52ee5f28c2f19ea386398436e446b23fb7a080ff.tar.gz
Initialize variable to avoid false positive in coverity
We now that plotInfo.nr will always be positive. Still, this is cheap and shuts up the "defect". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index fb75b08cf..cd6a7a157 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1151,7 +1151,7 @@ struct plot_data *ProfileWidget2::getEntryFromPos(QPointF pos)
{
// find the time stamp corresponding to the mouse position
int seconds = timeAxis->valueAt(pos);
- struct plot_data *entry;
+ struct plot_data *entry = NULL;
for (int i = 0; i < plotInfo.nr; i++) {
entry = plotInfo.entry + i;