From 52ee5f28c2f19ea386398436e446b23fb7a080ff Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 21 Jun 2015 21:35:04 -0700 Subject: 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 --- qt-ui/profile/profilewidget2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/profile') 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; -- cgit v1.2.3-70-g09d2