diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-12-20 09:37:56 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-20 09:53:06 -0800 |
commit | 0421a161b4e3e319fb57397b5a729a3440a82c80 (patch) | |
tree | a8994be0a1de08aea2a362baa0c0e1fb7aed69d2 /qt-ui/divelistview.cpp | |
parent | 4ab58d6b47e8786d0a10c1308ee487e10af7fa83 (diff) | |
download | subsurface-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/divelistview.cpp')
-rw-r--r-- | qt-ui/divelistview.cpp | 2 |
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; |