Fixing warning about freediving
Guido Lerch
guido.lerch at gmail.com
Wed Oct 21 15:26:17 PDT 2015
heres another one for you to rewrite.
let me know what and why you rewrote, otherwise I wont grow.
2015-10-22 0:16 GMT+02:00 Dirk Hohndel <dirk at hohndel.org>:
> I was just about to look at that warning. Thanks for fixing it. I rewrote
> both your patch and your commit message, though :-)
>
> /D
>
> On Wed, Oct 21, 2015 at 11:40:11PM +0200, Guido Lerch wrote:
> > trashed my subsurface folder and started from scratch today with the last
> > master @ 4722df8
> >
> > while building I got a warning
> >
> >
> >
> > --
> > Best regards,
> > Guido
>
> > From b1888cc5a96a8fd32b2fa57bfce8f013157df742 Mon Sep 17 00:00:00 2001
> > From: Guido Lerch <guido.lerch at gmail.com>
> > Date: Wed, 21 Oct 2015 23:35:41 +0200
> > Subject: [PATCH] Fixing build warning about freediving
> >
> > This just fixes an issue with freediving not being with a switch
> statement
> > that was a little annoying.
> >
> > location: profice.c
> > function: plot_string
> >
> > Signed-off-by: Guido Lerch <guido.lerch at gmail.com>
> > ---
> > profile.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/profile.c b/profile.c
> > index 55cf629..4bfb5ff 100644
> > --- a/profile.c
> > +++ b/profile.c
> > @@ -1173,6 +1173,9 @@ static void plot_string(struct plot_info *pi,
> struct plot_data *entry, struct me
> > case AIR:
> > /* nothing */
> > break;
> > + case FREEDIVING:
> > + /* nothing */
> > + break;
> > }
> > }
> > if (entry->stopdepth) {
> > --
> > 2.3.8 (Apple Git-58)
> >
>
> > _______________________________________________
> > subsurface mailing list
> > subsurface at subsurface-divelog.org
> > http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
--
Best regards,
Guido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151022/f6933c64/attachment.html>
-------------- next part --------------
From ed3692e5fa8c12a27bd1e6035b50beb659ef8ccb Mon Sep 17 00:00:00 2001
From: Guido Lerch <guido.lerch at gmail.com>
Date: Thu, 22 Oct 2015 00:17:05 +0200
Subject: [PATCH 3/3] Fixing annoying compiler warning
Adding { } to if clause to avoid dangling warning
/Users/guidolerch/src/subsurface/qt-models/cylindermodel.cpp:117:
warning: add explicit braces to avoid dangling else [-Wdangling-else]
Signed-off-by: Guido Lerch <guido.lerch at gmail.com>
---
qt-models/cylindermodel.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp
index 8c9bee8..c697145 100644
--- a/qt-models/cylindermodel.cpp
+++ b/qt-models/cylindermodel.cpp
@@ -112,17 +112,19 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
break;
case Qt::DecorationRole:
if (index.column() == REMOVE)
- if (rowCount() > 1)
+ if (rowCount() > 1) {
ret = trashIcon();
- else
+ } else {
ret = trashForbiddenIcon();
+ }
break;
case Qt::SizeHintRole:
if (index.column() == REMOVE)
- if (rowCount() > 1)
+ if (rowCount() > 1) {
ret = trashIcon();
- else
+ } else {
ret = trashForbiddenIcon();
+ }
break;
case Qt::ToolTipRole:
--
2.3.8 (Apple Git-58)
More information about the subsurface
mailing list