Merge lp:~charlesk/keeper/fix-armhf-warnings into lp:keeper/devel

Proposed by Marcus Tomlinson
Status: Merged
Merge reported by: Charles Kerr
Merged at revision: not available
Proposed branch: lp:~charlesk/keeper/fix-armhf-warnings
Merge into: lp:keeper/devel
Prerequisite: lp:~charlesk/keeper/fix-fixed-speed-test
Diff against target: 231 lines (+49/-16)
13 files modified
include/helper/backup-helper.h (+1/-1)
include/helper/helper.h (+6/-4)
include/helper/metadata.h (+1/-0)
src/helper/helper.cpp (+1/-1)
src/helper/metadata.cpp (+4/-0)
src/service/backup-choices.cpp (+1/-1)
src/service/backup-choices.h (+1/-1)
src/service/metadata-provider.h (+1/-1)
src/service/restore-choices.cpp (+1/-1)
src/service/restore-choices.h (+1/-1)
src/storage-framework/storage_framework_client.h (+1/-1)
src/util/attributes.h (+26/-0)
src/util/unix-signal-handler.cpp (+4/-4)
To merge this branch: bzr merge lp:~charlesk/keeper/fix-armhf-warnings
Reviewer Review Type Date Requested Status
unity-api-1-bot continuous-integration Needs Fixing
Xavi Garcia (community) Approve
Review via email: mp+303256@code.launchpad.net

This proposal supersedes a proposal from 2016-08-18.

Commit message

Fix various warnings reported by the armhf build.

Description of the change

Fix various warnings reported by the armhf build at <https://launchpadlibrarian.net/278530803/buildlog_ubuntu-xenial-armhf.keeper_0.0.1-0~92.1~ubuntu16.04.1_BUILDING.txt.gz>

* making some classes final
* making some methods pure
* making some methods const
* adding explicit Metadata dtor
* fix implicit numerical conversion

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Continuous integration, rev:99
https://jenkins.canonical.com/unity-api-1/job/lp-keeper-ci/9/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/407/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/413
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=vivid+overlay/321
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=xenial+overlay/321
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=yakkety/321
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/251
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/251/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/251
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/251/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/251/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/251
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/251/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/251/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/251/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/251
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/251/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/251
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/251/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/251/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-keeper-ci/9/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Xavi Garcia (xavi-garcia-mena) wrote :

Changes look good to me, we have compilation errors but they seem to be related with the changes included in the prerequisite branch.

review: Approve
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://jenkins.canonical.com/unity-api-1/job/lp-keeper-autoland/2/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/415/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/421
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=vivid+overlay/328
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=xenial+overlay/328
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=yakkety/328
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/258
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/258/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/258
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/258/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/258/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/258
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/258/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/258/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/258
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/258/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/258
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/258/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/258/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/258
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/258/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'include/helper/backup-helper.h'
--- include/helper/backup-helper.h 2016-08-09 03:58:59 +0000
+++ include/helper/backup-helper.h 2016-08-18 13:09:17 +0000
@@ -31,7 +31,7 @@
31#include <memory>31#include <memory>
3232
33class BackupHelperPrivate;33class BackupHelperPrivate;
34class BackupHelper : public Helper34class BackupHelper final: public Helper
35{35{
36 Q_OBJECT36 Q_OBJECT
37 Q_DECLARE_PRIVATE(BackupHelper)37 Q_DECLARE_PRIVATE(BackupHelper)
3838
=== modified file 'include/helper/helper.h'
--- include/helper/helper.h 2016-08-11 02:34:33 +0000
+++ include/helper/helper.h 2016-08-18 13:09:17 +0000
@@ -19,6 +19,8 @@
1919
20#pragma once20#pragma once
2121
22#include <util/attributes.h>
23
22#include <QObject>24#include <QObject>
23#include <QScopedPointer>25#include <QScopedPointer>
2426
@@ -38,16 +40,16 @@
38 enum class State {NOT_STARTED, STARTED, CANCELLED, FAILED, COMPLETE};40 enum class State {NOT_STARTED, STARTED, CANCELLED, FAILED, COMPLETE};
3941
40 Q_PROPERTY(Helper::State state READ state NOTIFY state_changed)42 Q_PROPERTY(Helper::State state READ state NOTIFY state_changed)
41 State state() const;43 State state() const __pure;
4244
43 // NB: range is [0.0 .. 1.0]45 // NB: range is [0.0 .. 1.0]
44 Q_PROPERTY(float percent_done READ percent_done NOTIFY percent_done_changed)46 Q_PROPERTY(float percent_done READ percent_done NOTIFY percent_done_changed)
45 float percent_done() const;47 float percent_done() const __pure;
4648
47 // NB: units is bytes_per_second49 // NB: units is bytes_per_second
48 int speed() const;50 int speed() const __pure;
4951
50 qint64 expected_size() const;52 qint64 expected_size() const __pure;
51 void set_expected_size(qint64 n_bytes);53 void set_expected_size(qint64 n_bytes);
5254
53 static void registerMetaTypes();55 static void registerMetaTypes();
5456
=== modified file 'include/helper/metadata.h'
--- include/helper/metadata.h 2016-08-09 01:07:04 +0000
+++ include/helper/metadata.h 2016-08-18 13:09:17 +0000
@@ -31,6 +31,7 @@
3131
32 Metadata();32 Metadata();
33 Metadata(QString const& uuid, QString const& display_name);33 Metadata(QString const& uuid, QString const& display_name);
34 ~Metadata();
3435
35 // metadata keys36 // metadata keys
36 static QString const TYPE_KEY;37 static QString const TYPE_KEY;
3738
=== modified file 'src/helper/helper.cpp'
--- src/helper/helper.cpp 2016-08-12 04:02:53 +0000
+++ src/helper/helper.cpp 2016-08-18 13:09:17 +0000
@@ -182,7 +182,7 @@
182 size_ += n_bytes;182 size_ += n_bytes;
183 sized_ += double(n_bytes);183 sized_ += double(n_bytes);
184184
185 history_.add(clock_(), n_bytes);185 history_.add(clock_(), size_t(n_bytes));
186186
187 update_percent_done();187 update_percent_done();
188 }188 }
189189
=== modified file 'src/helper/metadata.cpp'
--- src/helper/metadata.cpp 2016-08-09 01:07:04 +0000
+++ src/helper/metadata.cpp 2016-08-18 13:09:17 +0000
@@ -52,6 +52,10 @@
52{52{
53}53}
5454
55Metadata::~Metadata()
56{
57}
58
55bool59bool
56Metadata::get_property(QString const& property_name, QString& setme) const60Metadata::get_property(QString const& property_name, QString& setme) const
57{61{
5862
=== modified file 'src/service/backup-choices.cpp'
--- src/service/backup-choices.cpp 2016-08-10 02:27:40 +0000
+++ src/service/backup-choices.cpp 2016-08-18 13:09:17 +0000
@@ -50,7 +50,7 @@
50BackupChoices::~BackupChoices() =default;50BackupChoices::~BackupChoices() =default;
5151
52QVector<Metadata>52QVector<Metadata>
53BackupChoices::get_backups()53BackupChoices::get_backups() const
54{54{
55 QVector<Metadata> ret;55 QVector<Metadata> ret;
5656
5757
=== modified file 'src/service/backup-choices.h'
--- src/service/backup-choices.h 2016-06-26 22:49:06 +0000
+++ src/service/backup-choices.h 2016-08-18 13:09:17 +0000
@@ -29,5 +29,5 @@
29public:29public:
30 BackupChoices();30 BackupChoices();
31 virtual ~BackupChoices();31 virtual ~BackupChoices();
32 QVector<Metadata> get_backups() override;32 QVector<Metadata> get_backups() const override;
33};33};
3434
=== modified file 'src/service/metadata-provider.h'
--- src/service/metadata-provider.h 2016-08-08 04:56:35 +0000
+++ src/service/metadata-provider.h 2016-08-18 13:09:17 +0000
@@ -27,7 +27,7 @@
27{27{
28public:28public:
29 virtual ~MetadataProvider() =0;29 virtual ~MetadataProvider() =0;
30 virtual QVector<Metadata> get_backups() =0;30 virtual QVector<Metadata> get_backups() const =0;
3131
32protected:32protected:
33 MetadataProvider() =default;33 MetadataProvider() =default;
3434
=== modified file 'src/service/restore-choices.cpp'
--- src/service/restore-choices.cpp 2016-07-19 10:54:53 +0000
+++ src/service/restore-choices.cpp 2016-08-18 13:09:17 +0000
@@ -89,7 +89,7 @@
89RestoreChoices::~RestoreChoices() =default;89RestoreChoices::~RestoreChoices() =default;
9090
91QVector<Metadata>91QVector<Metadata>
92RestoreChoices::get_backups()92RestoreChoices::get_backups() const
93{93{
94 QVector<Metadata> ret;94 QVector<Metadata> ret;
9595
9696
=== modified file 'src/service/restore-choices.h'
--- src/service/restore-choices.h 2016-06-28 21:41:31 +0000
+++ src/service/restore-choices.h 2016-08-18 13:09:17 +0000
@@ -33,7 +33,7 @@
33public:33public:
34 RestoreChoices();34 RestoreChoices();
35 virtual ~RestoreChoices();35 virtual ~RestoreChoices();
36 QVector<Metadata> get_backups() override;36 QVector<Metadata> get_backups() const override;
3737
38private:38private:
39 unity::storage::qt::client::Runtime::SPtr runtime_;39 unity::storage::qt::client::Runtime::SPtr runtime_;
4040
=== modified file 'src/storage-framework/storage_framework_client.h'
--- src/storage-framework/storage_framework_client.h 2016-08-12 04:03:19 +0000
+++ src/storage-framework/storage_framework_client.h 2016-08-18 13:09:17 +0000
@@ -22,7 +22,7 @@
2222
23#include <unity/storage/qt/client/client-api.h>23#include <unity/storage/qt/client/client-api.h>
2424
25class StorageFrameworkClient : public QObject25class StorageFrameworkClient final: public QObject
26{26{
27 Q_OBJECT27 Q_OBJECT
28public:28public:
2929
=== added file 'src/util/attributes.h'
--- src/util/attributes.h 1970-01-01 00:00:00 +0000
+++ src/util/attributes.h 2016-08-18 13:09:17 +0000
@@ -0,0 +1,26 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Charles Kerr <charles.kerr@canonical.com>
18 */
19
20#pragma once
21
22#ifdef __GNUC__
23 #define __pure __attribute__((pure))
24#else
25 #define __pure
26#endif
027
=== modified file 'src/util/unix-signal-handler.cpp'
--- src/util/unix-signal-handler.cpp 2016-06-25 20:05:49 +0000
+++ src/util/unix-signal-handler.cpp 2016-08-18 13:09:17 +0000
@@ -54,14 +54,14 @@
54UnixSignalHandler::intSignalHandler(int)54UnixSignalHandler::intSignalHandler(int)
55{55{
56 char a = 1;56 char a = 1;
57 ::write(sigintFd[0], &a, sizeof(a));57 (void) ::write(sigintFd[0], &a, sizeof(a));
58}58}
5959
60void60void
61UnixSignalHandler::termSignalHandler(int)61UnixSignalHandler::termSignalHandler(int)
62{62{
63 char a = 1;63 char a = 1;
64 ::write(sigtermFd[0], &a, sizeof(a));64 (void) ::write(sigtermFd[0], &a, sizeof(a));
65}65}
6666
67int67int
@@ -92,7 +92,7 @@
92{92{
93 m_socketNotifierTerm->setEnabled(false);93 m_socketNotifierTerm->setEnabled(false);
94 char tmp;94 char tmp;
95 ::read(sigtermFd[1], &tmp, sizeof(tmp));95 (void) ::read(sigtermFd[1], &tmp, sizeof(tmp));
9696
97 m_func();97 m_func();
9898
@@ -104,7 +104,7 @@
104{104{
105 m_socketNotifierInt->setEnabled(false);105 m_socketNotifierInt->setEnabled(false);
106 char tmp;106 char tmp;
107 ::read(sigintFd[1], &tmp, sizeof(tmp));107 (void) ::read(sigintFd[1], &tmp, sizeof(tmp));
108108
109 m_func();109 m_func();
110110

Subscribers

People subscribed via source and target branches

to all changes: