summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-20 09:37:56 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-20 09:53:06 -0800
commit0421a161b4e3e319fb57397b5a729a3440a82c80 (patch)
treea8994be0a1de08aea2a362baa0c0e1fb7aed69d2 /qt-ui
parent4ab58d6b47e8786d0a10c1308ee487e10af7fa83 (diff)
downloadsubsurface-0421a161b4e3e319fb57397b5a729a3440a82c80.tar.gz
Silence a few warnings
None of these are actual bugs. But none of the fixes are harmful, either. And much as I hate adding the 'default' clauses, I'd rather not have the build output cluttered by invalid warnings. The exception is the fix in divelistview.cpp - while I don't think it is possible for this function to be called with no dive selected, initializing pd to NULL is cheap insurance in case that does happen for some weird reason. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelistview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 11d7124bc..0af6fbb10 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -581,7 +581,7 @@ void DiveListView::addToTripAbove()
{
int idx, delta = (currentOrder == Qt::AscendingOrder) ? -1 : +1;
dive_trip_t *trip = NULL;
- struct dive *pd;
+ struct dive *pd = NULL;
struct dive *d = (struct dive *) contextMenuIndex.data(DiveTripModel::DIVE_ROLE).value<void*>();
if (!d) // shouldn't happen as we only are setting up this action if this is a dive
return;