Merge lp:~thomas-voss/dbus-cpp/force_gcc_4.7 into lp:dbus-cpp

Proposed by Thomas Voß
Status: Merged
Merged at revision: 44
Proposed branch: lp:~thomas-voss/dbus-cpp/force_gcc_4.7
Merge into: lp:dbus-cpp
Diff against target: 313 lines (+45/-36)
12 files modified
debian/control (+2/-0)
debian/rules (+4/-1)
include/core/dbus/compiler.h (+1/-0)
include/core/dbus/message_router.h (+2/-2)
include/core/dbus/types/variant.h (+3/-3)
src/core/dbus/introspection_parser.cpp (+1/-0)
tests/codec_test.cpp (+9/-7)
tests/executor_test.cpp (+1/-1)
tests/service_test.cpp (+1/-1)
tests/service_watcher_test.cpp (+8/-8)
tests/signal_delivery_test.cpp (+12/-12)
tests/stl_codec_test.cpp (+1/-1)
To merge this branch: bzr merge lp:~thomas-voss/dbus-cpp/force_gcc_4.7
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+204909@code.launchpad.net

Commit message

Force compilation against GCC 4.7.
Account for toolchain differences.

Description of the change

Force compilation against GCC 4.7.
Account for toolchain differences.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
43. By Thomas Voß

Adjust compiler selection.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
44. By Thomas Voß

Revert changes to binary package version.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
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 'debian/control'
2--- debian/control 2014-02-03 11:05:50 +0000
3+++ debian/control 2014-02-06 11:19:51 +0000
4@@ -5,6 +5,8 @@
5 dbus,
6 debhelper (>= 9),
7 doxygen,
8+ gcc-4.7,
9+ g++-4.7,
10 google-mock,
11 libboost-filesystem-dev,
12 libboost-system-dev,
13
14=== modified file 'debian/rules'
15--- debian/rules 2014-01-30 08:08:49 +0000
16+++ debian/rules 2014-02-06 11:19:51 +0000
17@@ -4,7 +4,10 @@
18 # Uncomment this to turn on verbose mode.
19 export DH_VERBOSE=1
20
21-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
22+include /usr/share/dpkg/default.mk
23+
24+export CC=$(DEB_HOST_MULTIARCH)-gcc-4.7
25+export CXX=$(DEB_HOST_MULTIARCH)-g++-4.7
26
27 export DPKG_GENSYMBOLS_CHECK_LEVEL=4
28
29
30=== modified file 'include/core/dbus/compiler.h'
31--- include/core/dbus/compiler.h 2013-11-27 18:57:42 +0000
32+++ include/core/dbus/compiler.h 2014-02-06 11:19:51 +0000
33@@ -23,6 +23,7 @@
34
35 #include <memory>
36 #include <set>
37+#include <stdexcept>
38 #include <string>
39 #include <vector>
40
41
42=== modified file 'include/core/dbus/message_router.h'
43--- include/core/dbus/message_router.h 2014-01-30 19:09:10 +0000
44+++ include/core/dbus/message_router.h 2014-02-06 11:19:51 +0000
45@@ -94,9 +94,9 @@
46 ul.unlock();
47 handler(msg);
48 return true;
49- } else {
50- return false;
51 }
52+
53+ return false;
54 }
55
56 private:
57
58=== modified file 'include/core/dbus/types/variant.h'
59--- include/core/dbus/types/variant.h 2014-01-20 22:04:16 +0000
60+++ include/core/dbus/types/variant.h 2014-02-06 11:19:51 +0000
61@@ -59,7 +59,7 @@
62 template<typename T>
63 static inline Variant encode(T t)
64 {
65- auto encoder = [t](dbus::Message::Writer& writer)
66+ Encoder encoder = [t](dbus::Message::Writer& writer)
67 {
68 Codec<T>::encode_argument(writer, t);
69 };
70@@ -74,7 +74,7 @@
71 template<typename T>
72 static inline Variant decode(T& t)
73 {
74- auto decoder = [&t](dbus::Message::Reader& reader)
75+ Decoder decoder = [&t](dbus::Message::Reader& reader)
76 {
77 Codec<T>::decode_argument(reader, t);
78 };
79@@ -94,7 +94,7 @@
80 };
81 }
82
83- inline Variant(const Variant& rhs) = default;
84+ inline Variant(const Variant&) = default;
85
86 inline Variant(Variant&& rhs)
87 : encoder(std::move(rhs.encoder)),
88
89=== modified file 'src/core/dbus/introspection_parser.cpp'
90--- src/core/dbus/introspection_parser.cpp 2013-11-27 18:57:42 +0000
91+++ src/core/dbus/introspection_parser.cpp 2014-02-06 11:19:51 +0000
92@@ -22,6 +22,7 @@
93
94 #include <iostream>
95 #include <map>
96+#include <stdexcept>
97
98 namespace core
99 {
100
101=== modified file 'tests/codec_test.cpp'
102--- tests/codec_test.cpp 2014-01-21 11:32:57 +0000
103+++ tests/codec_test.cpp 2014-02-06 11:19:51 +0000
104@@ -396,7 +396,8 @@
105 counter++;
106 }
107
108- EXPECT_EQ(5, counter);
109+ unsigned int expected_value{5};
110+ EXPECT_EQ(expected_value, counter);
111 }
112
113 TEST(Properties, DictionaryMappingToVariantsIsEncodedCorrectlyWithMap)
114@@ -421,10 +422,11 @@
115 std::map<std::string, dbus::types::Variant> map;
116 reader >> map;
117
118- EXPECT_EQ(5, map.size());
119- EXPECT_EQ(1, map.at("key1").as<std::uint32_t>());
120- EXPECT_EQ(2, map.at("key2").as<std::uint32_t>());
121- EXPECT_EQ(3, map.at("key3").as<std::uint32_t>());
122- EXPECT_EQ(4, map.at("key4").as<std::uint32_t>());
123- EXPECT_EQ(5, map.at("key5").as<std::uint32_t>());
124+ unsigned int expected_value{5};
125+ EXPECT_EQ(expected_value, map.size());
126+ EXPECT_EQ(std::uint32_t(1), map.at("key1").as<std::uint32_t>());
127+ EXPECT_EQ(std::uint32_t(2), map.at("key2").as<std::uint32_t>());
128+ EXPECT_EQ(std::uint32_t(3), map.at("key3").as<std::uint32_t>());
129+ EXPECT_EQ(std::uint32_t(4), map.at("key4").as<std::uint32_t>());
130+ EXPECT_EQ(std::uint32_t(5), map.at("key5").as<std::uint32_t>());
131 }
132
133=== modified file 'tests/executor_test.cpp'
134--- tests/executor_test.cpp 2014-01-14 14:24:29 +0000
135+++ tests/executor_test.cpp 2014-02-06 11:19:51 +0000
136@@ -101,7 +101,7 @@
137 bus->install_executor(dbus::asio::make_executor(bus));
138 std::thread t{[bus](){bus->run();}};
139
140- EXPECT_EQ(1, cross_process_sync.wait_for_signal_ready_for(std::chrono::milliseconds{500}));
141+ EXPECT_EQ(std::uint32_t(1), cross_process_sync.wait_for_signal_ready_for(std::chrono::milliseconds{500}));
142
143 auto stub_service = dbus::Service::use_service(bus, dbus::traits::Service<test::Service>::interface_name());
144 auto stub = stub_service->object_for_path(dbus::types::ObjectPath("/this/is/unlikely/to/exist/Service"));
145
146=== modified file 'tests/service_test.cpp'
147--- tests/service_test.cpp 2014-01-14 15:19:46 +0000
148+++ tests/service_test.cpp 2014-02-06 11:19:51 +0000
149@@ -108,7 +108,7 @@
150 auto bus = session_bus();
151 bus->install_executor(core::dbus::asio::make_executor(bus));
152 std::thread t{[bus](){ bus->run(); }};
153- EXPECT_EQ(1, cps1.wait_for_signal_ready_for(std::chrono::milliseconds{500}));
154+ EXPECT_EQ(std::uint32_t(1), cps1.wait_for_signal_ready_for(std::chrono::milliseconds{500}));
155
156 auto stub_service = dbus::Service::use_service(bus, dbus::traits::Service<test::Service>::interface_name());
157 auto stub = stub_service->object_for_path(dbus::types::ObjectPath("/this/is/unlikely/to/exist/Service"));
158
159=== modified file 'tests/service_watcher_test.cpp'
160--- tests/service_watcher_test.cpp 2014-01-27 14:45:59 +0000
161+++ tests/service_watcher_test.cpp 2014-02-06 11:19:51 +0000
162@@ -65,7 +65,7 @@
163 {
164 core::testing::SigTermCatcher sc;
165
166- EXPECT_EQ(1,
167+ EXPECT_EQ(std::uint32_t(1),
168 client_is_listening_for_service_registration.wait_for_signal_ready_for(
169 std::chrono::milliseconds{500}));
170
171@@ -122,11 +122,11 @@
172 if (t.joinable())
173 t.join();
174
175- EXPECT_EQ(1, owner_changed.size());
176+ EXPECT_EQ(std::uint32_t(1), owner_changed.size());
177 EXPECT_FALSE(owner_changed.at(0).first.empty());
178 EXPECT_TRUE(owner_changed.at(0).second.empty());
179- EXPECT_EQ(1, service_registered);
180- EXPECT_EQ(0, service_unregistered);
181+ EXPECT_EQ(std::uint32_t(1), service_registered);
182+ EXPECT_EQ(std::uint32_t(0), service_unregistered);
183
184 return ::testing::Test::HasFailure() ? core::posix::exit::Status::failure : core::posix::exit::Status::success;
185 };
186@@ -145,7 +145,7 @@
187
188 // Ensure that the client is listening for unregistration before we even
189 // start the service.
190- EXPECT_EQ(1,
191+ EXPECT_EQ(std::uint32_t(1),
192 client_is_listening_for_service_unregistration.wait_for_signal_ready_for(
193 std::chrono::milliseconds{500}));
194
195@@ -198,11 +198,11 @@
196 if (t.joinable())
197 t.join();
198
199- EXPECT_EQ(1, owner_changed.size());
200+ EXPECT_EQ(std::uint32_t(1), owner_changed.size());
201 EXPECT_TRUE(owner_changed.at(0).first.empty());
202 EXPECT_FALSE(owner_changed.at(0).second.empty());
203- EXPECT_EQ(0, service_registered);
204- EXPECT_EQ(1, service_unregistered);
205+ EXPECT_EQ(std::uint32_t(0), service_registered);
206+ EXPECT_EQ(std::uint32_t(1), service_unregistered);
207
208 return ::testing::Test::HasFailure() ? core::posix::exit::Status::failure : core::posix::exit::Status::success;
209 };
210
211=== modified file 'tests/signal_delivery_test.cpp'
212--- tests/signal_delivery_test.cpp 2014-01-30 10:57:01 +0000
213+++ tests/signal_delivery_test.cpp 2014-02-06 11:19:51 +0000
214@@ -77,7 +77,7 @@
215 std::thread t{[bus](){ bus->run(); }};
216
217 server_is_running.try_signal_ready_for(std::chrono::milliseconds{1000});
218- EXPECT_EQ(1,
219+ EXPECT_EQ(std::uint32_t(1),
220 client_has_setup_signals_and_connections.wait_for_signal_ready_for(
221 std::chrono::milliseconds{500}));
222
223@@ -113,7 +113,7 @@
224 test::Service::Interfaces::Foo::Signals::Dummy::ArgumentType received2 = -1;
225
226 // server ready
227- EXPECT_EQ(1,
228+ EXPECT_EQ(std::uint32_t(1),
229 server_is_running.wait_for_signal_ready_for(std::chrono::milliseconds{500}));
230
231 auto stub_service = dbus::Service::use_service(bus, dbus::traits::Service<test::Service>::interface_name());
232@@ -141,8 +141,8 @@
233 if (t.joinable())
234 t.join();
235
236- EXPECT_EQ(received1, 1);
237- EXPECT_EQ(received2, 2);
238+ EXPECT_EQ(std::uint32_t(1), received1);
239+ EXPECT_EQ(std::uint32_t(2), received2);
240
241 return ::testing::Test::HasFailure() ? core::posix::exit::Status::failure : core::posix::exit::Status::success;
242 };
243@@ -170,7 +170,7 @@
244 std::thread t{[bus](){ bus->run(); }};
245
246 server_is_running.try_signal_ready_for(std::chrono::milliseconds{1000});
247- EXPECT_EQ(1,
248+ EXPECT_EQ(std::uint32_t(1),
249 client_has_setup_signals_and_connections.wait_for_signal_ready_for(
250 std::chrono::milliseconds{500}));
251
252@@ -204,7 +204,7 @@
253 test::Service::Interfaces::Foo::Signals::Bar::ArgumentType received2 = -1;
254
255 // server ready
256- EXPECT_EQ(1,
257+ EXPECT_EQ(std::uint32_t(1),
258 server_is_running.wait_for_signal_ready_for(std::chrono::milliseconds{500}));
259
260 auto stub_service = dbus::Service::use_service(bus, dbus::traits::Service<test::Service>::interface_name());
261@@ -231,8 +231,8 @@
262 if (t.joinable())
263 t.join();
264
265- EXPECT_EQ(received1, 1);
266- EXPECT_EQ(received2, 2);
267+ EXPECT_EQ(std::uint32_t(1), received1);
268+ EXPECT_EQ(std::uint32_t(2), received2);
269
270 return ::testing::Test::HasFailure() ? core::posix::exit::Status::failure : core::posix::exit::Status::success;
271 };
272@@ -260,7 +260,7 @@
273 std::thread t{[bus](){ bus->run(); }};
274
275 server_is_running.try_signal_ready_for(std::chrono::milliseconds{1000});
276- EXPECT_EQ(1,
277+ EXPECT_EQ(std::uint32_t(1),
278 client_has_setup_signals_and_connections.wait_for_signal_ready_for(
279 std::chrono::milliseconds{500}));
280
281@@ -296,7 +296,7 @@
282 test::Service::Interfaces::Foo::Signals::Dummy::ArgumentType received2 = -1;
283
284 // server ready
285- EXPECT_EQ(1,
286+ EXPECT_EQ(std::uint32_t(1),
287 server_is_running.wait_for_signal_ready_for(std::chrono::milliseconds{500}));
288
289 auto stub_service = dbus::Service::use_service(bus, dbus::traits::Service<test::Service>::interface_name());
290@@ -323,8 +323,8 @@
291 if (t.joinable())
292 t.join();
293
294- EXPECT_EQ(received1, 1);
295- EXPECT_EQ(received2, 1);
296+ EXPECT_EQ(std::uint32_t(1), received1);
297+ EXPECT_EQ(std::uint32_t(1), received2);
298
299 return ::testing::Test::HasFailure() ? core::posix::exit::Status::failure : core::posix::exit::Status::success;
300 };
301
302=== modified file 'tests/stl_codec_test.cpp'
303--- tests/stl_codec_test.cpp 2014-01-20 22:04:16 +0000
304+++ tests/stl_codec_test.cpp 2014-02-06 11:19:51 +0000
305@@ -89,7 +89,7 @@
306 std::map<std::string, dbus::types::Variant> result;
307 msg->reader() >> result;
308
309- EXPECT_EQ(5, result.size());
310+ EXPECT_EQ(std::uint32_t(5), result.size());
311
312 for (const auto& element : result)
313 {

Subscribers

People subscribed via source and target branches