From c6baeb8142d5cbcac8b6abc3046d1aac166b8ca2 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:18:47 +0200 Subject: [PATCH 01/20] desktop-main.cpp: fix unused 'application' variable Signed-off-by: Lubomir I. Ivanov --- subsurface-desktop-main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/subsurface-desktop-main.cpp b/subsurface-desktop-main.cpp index 0a578892b..69fcb572b 100644 --- a/subsurface-desktop-main.cpp +++ b/subsurface-desktop-main.cpp @@ -31,6 +31,7 @@ int main(int argc, char **argv) bool no_filenames = true; QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true")); QApplication *application = new QApplication(argc, argv); + (void)application; QStringList files; QStringList importedFiles; QStringList arguments = QCoreApplication::arguments(); From 43ebfec1ff1048cad7cab9f977ee21654c011dd7 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:22:41 +0200 Subject: [PATCH 02/20] btdeviceselectiondialog.cpp: fix unused variable Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/btdeviceselectiondialog.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/desktop-widgets/btdeviceselectiondialog.cpp b/desktop-widgets/btdeviceselectiondialog.cpp index fb2cbc1f3..546f50ea3 100644 --- a/desktop-widgets/btdeviceselectiondialog.cpp +++ b/desktop-widgets/btdeviceselectiondialog.cpp @@ -52,8 +52,7 @@ BtDeviceSelectionDialog::BtDeviceSelectionDialog(QWidget *parent) : // Initialize WinSock and ask for version 2.2. ulRetCode = WSAStartup(MAKEWORD(2, 2), &WSAData); if (ulRetCode != SUCCESS) { - QMessageBox::StandardButton warningBox; - warningBox = QMessageBox::critical(this, "Bluetooth", + QMessageBox::critical(this, "Bluetooth", tr("Could not initialize Winsock version 2.2"), QMessageBox::Ok); return; } From 9f7c26cb386a7d061a440829e4b801ea6d629f97 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:23:25 +0200 Subject: [PATCH 03/20] locationinformation.cpp: fix unused variable Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/locationinformation.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index aee0b7328..ab2235120 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -540,7 +540,6 @@ void DiveLocationLineEdit::fixPopupPosition() { const QRect screen = QApplication::desktop()->availableGeometry(this); const int maxVisibleItems = 5; - Qt::LayoutDirection dir = layoutDirection(); QPoint pos; int rh, w; int h = (view->sizeHintForRow(0) * qMin(maxVisibleItems, view->model()->rowCount()) + 3) + 3; From d40caaaa31f94ed006859ee1437880d055c9dc45 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:32:19 +0200 Subject: [PATCH 04/20] divelogimportdialog.cpp: declare an enum as type 'known' is a static variable which is not used. by declaring 'enum Known', now there is a *type* which enumerates the values. Having 'static Known known = ' would then work, but since there is no use of such a variable there is no point of declaring it. There is also no use of the 'Known' type itself and an anonymous enum would work as well. Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/divelogimportdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp index 025d181d1..5747f3652 100644 --- a/desktop-widgets/divelogimportdialog.cpp +++ b/desktop-widgets/divelogimportdialog.cpp @@ -22,7 +22,7 @@ const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = { NULL, } }; -static enum { +enum Known { MANUAL, APD, APD2, @@ -30,7 +30,7 @@ static enum { SENSUS, SEABEAR, SUBSURFACE -} known; +}; ColumnNameProvider::ColumnNameProvider(QObject *parent) : QAbstractListModel(parent) { From c1495f08ec68a067fc7d1e73445aab20b375f7e1 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:40:44 +0200 Subject: [PATCH 05/20] subsurfacewebservices.cpp: remove unused FILE variable Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/subsurfacewebservices.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp index ee079cc48..c0866aa35 100644 --- a/desktop-widgets/subsurfacewebservices.cpp +++ b/desktop-widgets/subsurfacewebservices.cpp @@ -188,7 +188,6 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile, int i; struct dive *dive; for_each_dive (i, dive) { - FILE *f; char filename[PATH_MAX]; int streamsize; const char *membuf; From c2ff2be210cba14386d8b468dd3e6fde5f4abc40 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:40:55 +0200 Subject: [PATCH 06/20] subsurfacewebservices.cpp: make sure 'changed' is not unused Make sure 'changed' in SubsurfaceWebServices::buttonClicked() is not unused even if NO_MARBLE is defined. It appears to be used only in the #ifndef NO_MARBLE branch. Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/subsurfacewebservices.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp index c0866aa35..d66d3653b 100644 --- a/desktop-widgets/subsurfacewebservices.cpp +++ b/desktop-widgets/subsurfacewebservices.cpp @@ -411,6 +411,7 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button) struct dive *d; struct dive_site *ds; bool changed = false; + (void)changed; clear_table(&gps_location_table); QByteArray url = tr("Webservice").toLocal8Bit(); parse_xml_buffer(url.data(), downloadedData.data(), downloadedData.length(), &gps_location_table, NULL); From 9614952611597bd70a49533e9f67ee084ca39a5d Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:44:06 +0200 Subject: [PATCH 07/20] mainwindow.cpp: remove unused variable 'diveSitePictures' Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/mainwindow.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index e1f82fdf1..b9112c11a 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -137,8 +137,6 @@ MainWindow::MainWindow() : QMainWindow(), connect(diveSiteEdit, &LocationInformationWidget::endEditDiveSite, mainTab, &MainTab::refreshDisplayedDiveSite); - QWidget *diveSitePictures = new QWidget(); // Placeholder - std::pair enabled = std::make_pair("enabled", QVariant(true)); std::pair disabled = std::make_pair("enabled", QVariant(false)); PropertyList enabledList; From e7cd9d615c7a6b002775bad11f5c43c8130c0c3e Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:46:29 +0200 Subject: [PATCH 08/20] facebook_integration.cpp: add return statement to a 'bool' method Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/plugins/facebook/facebook_integration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-widgets/plugins/facebook/facebook_integration.cpp b/desktop-widgets/plugins/facebook/facebook_integration.cpp index e9b2297a0..700c8f624 100644 --- a/desktop-widgets/plugins/facebook/facebook_integration.cpp +++ b/desktop-widgets/plugins/facebook/facebook_integration.cpp @@ -7,7 +7,7 @@ FacebookPlugin::FacebookPlugin(QObject* parent): QObject(parent) bool FacebookPlugin::isConnected() { - + return false; } void FacebookPlugin::requestLogin() From 6f713fcb9999071d1e16d221bda6db5708e18666 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:48:06 +0200 Subject: [PATCH 09/20] maintab.cpp: remove unused variable Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/maintab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp index 864c24782..c36c69f20 100644 --- a/desktop-widgets/maintab.cpp +++ b/desktop-widgets/maintab.cpp @@ -1642,6 +1642,6 @@ void MainTab::contextMenuEvent(QContextMenuEvent *event) popup.addSeparator(); popup.addAction(tr("Delete selected images"), this, SLOT(removeSelectedPhotos())); popup.addAction(tr("Delete all images"), this, SLOT(removeAllPhotos())); - QAction *actionTaken = popup.exec(event->globalPos()); + popup.exec(event->globalPos()); event->accept(); } From aee6f0b2c4131ec65c1e1688eb9648d66c0bd506 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:50:30 +0200 Subject: [PATCH 10/20] diveshareexportdialog.cpp: fix an argument order warning Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/diveshareexportdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop-widgets/diveshareexportdialog.cpp b/desktop-widgets/diveshareexportdialog.cpp index 9fe6eefd6..435f5366e 100644 --- a/desktop-widgets/diveshareexportdialog.cpp +++ b/desktop-widgets/diveshareexportdialog.cpp @@ -11,8 +11,8 @@ DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) : QDialog(parent), ui(new Ui::DiveShareExportDialog), - reply(NULL), - exportSelected(false) + exportSelected(false), + reply(NULL) { ui->setupUi(this); } From 9b20a5bd4feb39574d5d82324dadbc9308cd85e3 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 22:56:55 +0200 Subject: [PATCH 11/20] divelocationmodel: fix some signed/unsigned warnings Use uint32_t for divesite UUIDs. Signed-off-by: Lubomir I. Ivanov --- qt-models/divelocationmodel.cpp | 8 ++++---- qt-models/divelocationmodel.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index e7c9aa30d..d185de1fe 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -128,7 +128,7 @@ void LocationInformationModel::update() endResetModel(); } -int32_t LocationInformationModel::addDiveSite(const QString& name, timestamp_t divetime, int lon, int lat) +uint32_t LocationInformationModel::addDiveSite(const QString& name, timestamp_t divetime, int lon, int lat) { degrees_t latitude, longitude; latitude.udeg = lat; @@ -189,10 +189,10 @@ bool filter_same_gps_cb (QAbstractItemModel *model, int sourceRow, const QModelI { int ref_lat = displayed_dive_site.latitude.udeg; int ref_lon = displayed_dive_site.longitude.udeg; - int ref_uuid = displayed_dive_site.uuid; + uint32_t ref_uuid = displayed_dive_site.uuid; QSortFilterProxyModel *self = (QSortFilterProxyModel*) model; - int ds_uuid = self->sourceModel()->index(sourceRow, LocationInformationModel::UUID, parent).data().toInt(); + uint32_t ds_uuid = self->sourceModel()->index(sourceRow, LocationInformationModel::UUID, parent).data().toUInt(); struct dive_site *ds = get_dive_site_by_uuid(ds_uuid); if (!ds) @@ -202,4 +202,4 @@ bool filter_same_gps_cb (QAbstractItemModel *model, int sourceRow, const QModelI return false; return (ds->latitude.udeg == ref_lat && ds->longitude.udeg == ref_lon && ds->uuid != ref_uuid); -} \ No newline at end of file +} diff --git a/qt-models/divelocationmodel.h b/qt-models/divelocationmodel.h index d5b8705ce..f3e9cac1f 100644 --- a/qt-models/divelocationmodel.h +++ b/qt-models/divelocationmodel.h @@ -22,7 +22,7 @@ public: int columnCount(const QModelIndex &parent) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index = QModelIndex(), int role = Qt::DisplayRole) const; - int32_t addDiveSite(const QString& name, timestamp_t divetime, int lat = 0, int lon = 0); + uint32_t addDiveSite(const QString& name, timestamp_t divetime, int lat = 0, int lon = 0); bool setData(const QModelIndex &index, const QVariant &value, int role); bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex()); void setFirstRowTextField(QLineEdit *textField); From 73ddd57cf0e3ce3c45ba9c340af47ae74267235a Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 23:00:14 +0200 Subject: [PATCH 12/20] preferences_network.cpp: remove some unused 'reply' variables Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/preferences/preferences_network.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop-widgets/preferences/preferences_network.cpp b/desktop-widgets/preferences/preferences_network.cpp index 3780a6c91..d812f4ab1 100644 --- a/desktop-widgets/preferences/preferences_network.cpp +++ b/desktop-widgets/preferences/preferences_network.cpp @@ -76,7 +76,7 @@ void PreferencesNetwork::syncSettings() CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this); connect(cloudAuth, SIGNAL(finishedAuthenticate()), this, SLOT(cloudPinNeeded())); connect(cloudAuth, SIGNAL(passwordChangeSuccessful()), this, SLOT(passwordUpdateSuccessfull())); - QNetworkReply *reply = cloudAuth->backend(email, password, "", newpassword); + cloudAuth->backend(email, password, "", newpassword); ui->cloud_storage_new_passwd->setText(""); free(prefs.cloud_storage_newpassword); prefs.cloud_storage_newpassword = strdup(qPrintable(newpassword)); @@ -97,7 +97,7 @@ void PreferencesNetwork::syncSettings() } else { CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this); connect(cloudAuth, SIGNAL(finishedAuthenticate()), this, SLOT(cloudPinNeeded())); - QNetworkReply *reply = cloudAuth->backend(email, password); + cloudAuth->backend(email, password); } } } else if (prefs.cloud_verification_status == CS_NEED_TO_VERIFY) { @@ -110,7 +110,7 @@ void PreferencesNetwork::syncSettings() } CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this); connect(cloudAuth, SIGNAL(finishedAuthenticate()), this, SLOT(cloudPinNeeded())); - QNetworkReply *reply = cloudAuth->backend(email, password, pin); + cloudAuth->backend(email, password, pin); } } SAVE_OR_REMOVE("email", default_prefs.cloud_storage_email, email); @@ -169,4 +169,4 @@ void PreferencesNetwork::proxyType_changed(int idx) void PreferencesNetwork::passwordUpdateSuccessfull() { ui->cloud_storage_password->setText(prefs.cloud_storage_password); -} \ No newline at end of file +} From e2550de5e6a94cd8f7b6a45d1de1c4547489a177 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 23:02:58 +0200 Subject: [PATCH 13/20] profilewidget2.cpp: remove unused variables Signed-off-by: Lubomir I. Ivanov --- profile-widget/profilewidget2.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 177ceab75..ca9eead95 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1291,7 +1291,7 @@ void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event) action->setData(event->globalPos()); if (same_string(current_dc->model, "manually added dive")) - QAction *editProfileAction = m.addAction(tr("Edit the profile"), this, SIGNAL(editCurrentDive())); + m.addAction(tr("Edit the profile"), this, SIGNAL(editCurrentDive())); if (DiveEventItem *item = dynamic_cast(sceneItem)) { action = new QAction(&m); @@ -1621,7 +1621,6 @@ void ProfileWidget2::repositionDiveHandlers() { DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance(); // Re-position the user generated dive handlers - struct gasmix mix, lastmix; for (int i = 0; i < plannerModel->rowCount(); i++) { struct divedatapoint datapoint = plannerModel->at(i); if (datapoint.time == 0) // those are the magic entries for tanks From 44c0f978b33154611966b3f9db4c7e0cf54a9ffc Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 23:04:54 +0200 Subject: [PATCH 14/20] filtermodels.cpp: fix an argument order warning Signed-off-by: Lubomir I. Ivanov --- qt-models/filtermodels.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp index f56f4be1c..cbb83d06f 100644 --- a/qt-models/filtermodels.cpp +++ b/qt-models/filtermodels.cpp @@ -295,9 +295,9 @@ void LocationFilterModel::repopulate() MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent), + divesDisplayed(0), justCleared(false), - curr_dive_site(NULL), - divesDisplayed(0) + curr_dive_site(NULL) { } From a8d8ec4ae9e7f34165af01a2cf9c562b7aa9516f Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 23:06:59 +0200 Subject: [PATCH 15/20] diveplannermodel.cpp: move unused variables into a commented section Signed-off-by: Lubomir I. Ivanov --- qt-models/diveplannermodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 70a7c6f62..5e2315318 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -691,8 +691,6 @@ divedatapoint DivePlannerPointsModel::at(int row) void DivePlannerPointsModel::remove(const QModelIndex &index) { - int i; - int rows = rowCount(); if (index.column() != REMOVE || rowCount() == 1) return; @@ -707,6 +705,8 @@ void DivePlannerPointsModel::remove(const QModelIndex &index) * remove method that will pass the first and last index of the * removed rows, and remove those in a go. */ +// int i; +// int rows = rowCount(); // if (QApplication::keyboardModifiers() & Qt::ControlModifier) { // beginRemoveRows(QModelIndex(), index.row(), rows - 1); // for (i = rows - 1; i >= index.row(); i--) From cab9870be36a54934543c750310d0e0abfded3e6 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 23:13:30 +0200 Subject: [PATCH 16/20] profile.c: mark get_local_sac() as unused Signed-off-by: Lubomir I. Ivanov --- subsurface-core/profile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subsurface-core/profile.c b/subsurface-core/profile.c index edba51ebd..8cc6efb12 100644 --- a/subsurface-core/profile.c +++ b/subsurface-core/profile.c @@ -157,6 +157,9 @@ void remember_event(const char *eventname) evn_used++; } +/* UNUSED! */ +static int get_local_sac(struct plot_data *entry1, struct plot_data *entry2, struct dive *dive) __attribute__((unused)); + /* Get local sac-rate (in ml/min) between entry1 and entry2 */ static int get_local_sac(struct plot_data *entry1, struct plot_data *entry2, struct dive *dive) { From 80a67b7a2734bf117b2c648b1d689ddb17ba2a42 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 23:15:49 +0200 Subject: [PATCH 17/20] profile.c: remove unused variables Signed-off-by: Lubomir I. Ivanov --- subsurface-core/profile.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/subsurface-core/profile.c b/subsurface-core/profile.c index 8cc6efb12..1969a6fac 100644 --- a/subsurface-core/profile.c +++ b/subsurface-core/profile.c @@ -723,7 +723,6 @@ static int sac_between(struct dive *dive, struct plot_data *first, struct plot_d double pressuretime; pressure_t a, b; cylinder_t *cyl; - int duration; if (first == last) return 0; @@ -811,10 +810,7 @@ static void fill_sac(struct dive *dive, struct plot_info *pi, int idx) static void calculate_sac(struct dive *dive, struct plot_info *pi) { - int i = 0, last = 0; - struct plot_data *last_entry = NULL; - - for (i = 0; i < pi->nr; i++) + for (int i = 0; i < pi->nr; i++) fill_sac(dive, pi, i); } From 809f50753770a6b55cafb0ac5d9dc0a63b47d0d4 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 23:17:24 +0200 Subject: [PATCH 18/20] preferencesdialog.cpp: silence a switch warning Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/preferences/preferencesdialog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop-widgets/preferences/preferencesdialog.cpp b/desktop-widgets/preferences/preferencesdialog.cpp index 6f3523c0b..6885469c5 100644 --- a/desktop-widgets/preferences/preferencesdialog.cpp +++ b/desktop-widgets/preferences/preferencesdialog.cpp @@ -84,6 +84,7 @@ void PreferencesDialog::buttonClicked(QAbstractButton* btn) case QDialogButtonBox::AcceptRole : applyRequested(true); return; case QDialogButtonBox::RejectRole : cancelRequested(); return; case QDialogButtonBox::ResetRole : defaultsRequested(); return; + default: return; } } From e31b6c0ed38734b2691acefb8667a828d40108db Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 23:18:30 +0200 Subject: [PATCH 19/20] dive.c: remove unused variable Signed-off-by: Lubomir I. Ivanov --- subsurface-core/dive.c | 1 - 1 file changed, 1 deletion(-) diff --git a/subsurface-core/dive.c b/subsurface-core/dive.c index 2ae84ca1e..82012fa25 100644 --- a/subsurface-core/dive.c +++ b/subsurface-core/dive.c @@ -2878,7 +2878,6 @@ static struct dive *create_new_copy(struct dive *from) static void force_fixup_dive(struct dive *d) { struct divecomputer *dc = &d->dc; - int old_maxdepth = dc->maxdepth.mm; int old_temp = dc->watertemp.mkelvin; int old_mintemp = d->mintemp.mkelvin; int old_maxtemp = d->maxtemp.mkelvin; From 829f7a2ee264b4e25e8ea926a98199f8049a23d6 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 7 Nov 2015 23:20:09 +0200 Subject: [PATCH 20/20] abstractpreferenceswidget.cpp: fix argument warning Signed-off-by: Lubomir I. Ivanov --- desktop-widgets/preferences/abstractpreferenceswidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-widgets/preferences/abstractpreferenceswidget.cpp b/desktop-widgets/preferences/abstractpreferenceswidget.cpp index 9334c74ed..54d2417f9 100644 --- a/desktop-widgets/preferences/abstractpreferenceswidget.cpp +++ b/desktop-widgets/preferences/abstractpreferenceswidget.cpp @@ -1,7 +1,7 @@ #include "abstractpreferenceswidget.h" AbstractPreferencesWidget::AbstractPreferencesWidget(const QString& name, const QIcon& icon, float positionHeight) -: QWidget(), _name(name), _icon(icon), _positionHeight(positionHeight) +: QWidget(), _icon(icon), _name(name), _positionHeight(positionHeight) { }