From 0421a161b4e3e319fb57397b5a729a3440a82c80 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 20 Dec 2013 09:37:56 -0800 Subject: 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 --- qt-ui/divelistview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') 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(); if (!d) // shouldn't happen as we only are setting up this action if this is a dive return; -- cgit v1.2.3-70-g09d2