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
1=== modified file 'include/helper/backup-helper.h'
2--- include/helper/backup-helper.h 2016-08-09 03:58:59 +0000
3+++ include/helper/backup-helper.h 2016-08-18 13:09:17 +0000
4@@ -31,7 +31,7 @@
5 #include <memory>
6
7 class BackupHelperPrivate;
8-class BackupHelper : public Helper
9+class BackupHelper final: public Helper
10 {
11 Q_OBJECT
12 Q_DECLARE_PRIVATE(BackupHelper)
13
14=== modified file 'include/helper/helper.h'
15--- include/helper/helper.h 2016-08-11 02:34:33 +0000
16+++ include/helper/helper.h 2016-08-18 13:09:17 +0000
17@@ -19,6 +19,8 @@
18
19 #pragma once
20
21+#include <util/attributes.h>
22+
23 #include <QObject>
24 #include <QScopedPointer>
25
26@@ -38,16 +40,16 @@
27 enum class State {NOT_STARTED, STARTED, CANCELLED, FAILED, COMPLETE};
28
29 Q_PROPERTY(Helper::State state READ state NOTIFY state_changed)
30- State state() const;
31+ State state() const __pure;
32
33 // NB: range is [0.0 .. 1.0]
34 Q_PROPERTY(float percent_done READ percent_done NOTIFY percent_done_changed)
35- float percent_done() const;
36+ float percent_done() const __pure;
37
38 // NB: units is bytes_per_second
39- int speed() const;
40+ int speed() const __pure;
41
42- qint64 expected_size() const;
43+ qint64 expected_size() const __pure;
44 void set_expected_size(qint64 n_bytes);
45
46 static void registerMetaTypes();
47
48=== modified file 'include/helper/metadata.h'
49--- include/helper/metadata.h 2016-08-09 01:07:04 +0000
50+++ include/helper/metadata.h 2016-08-18 13:09:17 +0000
51@@ -31,6 +31,7 @@
52
53 Metadata();
54 Metadata(QString const& uuid, QString const& display_name);
55+ ~Metadata();
56
57 // metadata keys
58 static QString const TYPE_KEY;
59
60=== modified file 'src/helper/helper.cpp'
61--- src/helper/helper.cpp 2016-08-12 04:02:53 +0000
62+++ src/helper/helper.cpp 2016-08-18 13:09:17 +0000
63@@ -182,7 +182,7 @@
64 size_ += n_bytes;
65 sized_ += double(n_bytes);
66
67- history_.add(clock_(), n_bytes);
68+ history_.add(clock_(), size_t(n_bytes));
69
70 update_percent_done();
71 }
72
73=== modified file 'src/helper/metadata.cpp'
74--- src/helper/metadata.cpp 2016-08-09 01:07:04 +0000
75+++ src/helper/metadata.cpp 2016-08-18 13:09:17 +0000
76@@ -52,6 +52,10 @@
77 {
78 }
79
80+Metadata::~Metadata()
81+{
82+}
83+
84 bool
85 Metadata::get_property(QString const& property_name, QString& setme) const
86 {
87
88=== modified file 'src/service/backup-choices.cpp'
89--- src/service/backup-choices.cpp 2016-08-10 02:27:40 +0000
90+++ src/service/backup-choices.cpp 2016-08-18 13:09:17 +0000
91@@ -50,7 +50,7 @@
92 BackupChoices::~BackupChoices() =default;
93
94 QVector<Metadata>
95-BackupChoices::get_backups()
96+BackupChoices::get_backups() const
97 {
98 QVector<Metadata> ret;
99
100
101=== modified file 'src/service/backup-choices.h'
102--- src/service/backup-choices.h 2016-06-26 22:49:06 +0000
103+++ src/service/backup-choices.h 2016-08-18 13:09:17 +0000
104@@ -29,5 +29,5 @@
105 public:
106 BackupChoices();
107 virtual ~BackupChoices();
108- QVector<Metadata> get_backups() override;
109+ QVector<Metadata> get_backups() const override;
110 };
111
112=== modified file 'src/service/metadata-provider.h'
113--- src/service/metadata-provider.h 2016-08-08 04:56:35 +0000
114+++ src/service/metadata-provider.h 2016-08-18 13:09:17 +0000
115@@ -27,7 +27,7 @@
116 {
117 public:
118 virtual ~MetadataProvider() =0;
119- virtual QVector<Metadata> get_backups() =0;
120+ virtual QVector<Metadata> get_backups() const =0;
121
122 protected:
123 MetadataProvider() =default;
124
125=== modified file 'src/service/restore-choices.cpp'
126--- src/service/restore-choices.cpp 2016-07-19 10:54:53 +0000
127+++ src/service/restore-choices.cpp 2016-08-18 13:09:17 +0000
128@@ -89,7 +89,7 @@
129 RestoreChoices::~RestoreChoices() =default;
130
131 QVector<Metadata>
132-RestoreChoices::get_backups()
133+RestoreChoices::get_backups() const
134 {
135 QVector<Metadata> ret;
136
137
138=== modified file 'src/service/restore-choices.h'
139--- src/service/restore-choices.h 2016-06-28 21:41:31 +0000
140+++ src/service/restore-choices.h 2016-08-18 13:09:17 +0000
141@@ -33,7 +33,7 @@
142 public:
143 RestoreChoices();
144 virtual ~RestoreChoices();
145- QVector<Metadata> get_backups() override;
146+ QVector<Metadata> get_backups() const override;
147
148 private:
149 unity::storage::qt::client::Runtime::SPtr runtime_;
150
151=== modified file 'src/storage-framework/storage_framework_client.h'
152--- src/storage-framework/storage_framework_client.h 2016-08-12 04:03:19 +0000
153+++ src/storage-framework/storage_framework_client.h 2016-08-18 13:09:17 +0000
154@@ -22,7 +22,7 @@
155
156 #include <unity/storage/qt/client/client-api.h>
157
158-class StorageFrameworkClient : public QObject
159+class StorageFrameworkClient final: public QObject
160 {
161 Q_OBJECT
162 public:
163
164=== added file 'src/util/attributes.h'
165--- src/util/attributes.h 1970-01-01 00:00:00 +0000
166+++ src/util/attributes.h 2016-08-18 13:09:17 +0000
167@@ -0,0 +1,26 @@
168+/*
169+ * Copyright (C) 2016 Canonical, Ltd.
170+ *
171+ * This program is free software: you can redistribute it and/or modify it
172+ * under the terms of the GNU General Public License version 3, as published
173+ * by the Free Software Foundation.
174+ *
175+ * This program is distributed in the hope that it will be useful, but
176+ * WITHOUT ANY WARRANTY; without even the implied warranties of
177+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
178+ * PURPOSE. See the GNU General Public License for more details.
179+ *
180+ * You should have received a copy of the GNU General Public License along
181+ * with this program. If not, see <http://www.gnu.org/licenses/>.
182+ *
183+ * Authors:
184+ * Charles Kerr <charles.kerr@canonical.com>
185+ */
186+
187+#pragma once
188+
189+#ifdef __GNUC__
190+ #define __pure __attribute__((pure))
191+#else
192+ #define __pure
193+#endif
194
195=== modified file 'src/util/unix-signal-handler.cpp'
196--- src/util/unix-signal-handler.cpp 2016-06-25 20:05:49 +0000
197+++ src/util/unix-signal-handler.cpp 2016-08-18 13:09:17 +0000
198@@ -54,14 +54,14 @@
199 UnixSignalHandler::intSignalHandler(int)
200 {
201 char a = 1;
202- ::write(sigintFd[0], &a, sizeof(a));
203+ (void) ::write(sigintFd[0], &a, sizeof(a));
204 }
205
206 void
207 UnixSignalHandler::termSignalHandler(int)
208 {
209 char a = 1;
210- ::write(sigtermFd[0], &a, sizeof(a));
211+ (void) ::write(sigtermFd[0], &a, sizeof(a));
212 }
213
214 int
215@@ -92,7 +92,7 @@
216 {
217 m_socketNotifierTerm->setEnabled(false);
218 char tmp;
219- ::read(sigtermFd[1], &tmp, sizeof(tmp));
220+ (void) ::read(sigtermFd[1], &tmp, sizeof(tmp));
221
222 m_func();
223
224@@ -104,7 +104,7 @@
225 {
226 m_socketNotifierInt->setEnabled(false);
227 char tmp;
228- ::read(sigintFd[1], &tmp, sizeof(tmp));
229+ (void) ::read(sigintFd[1], &tmp, sizeof(tmp));
230
231 m_func();
232

Subscribers

People subscribed via source and target branches

to all changes: