Mir

Merge lp:~3v1n0/mir/compilation-fixes-trusty into lp:mir

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 2309
Proposed branch: lp:~3v1n0/mir/compilation-fixes-trusty
Merge into: lp:mir
Diff against target: 95 lines (+19/-10)
5 files modified
examples/server_example_window_management.cpp (+1/-1)
examples/server_example_window_management.h (+1/-1)
src/include/server/mir/glib_main_loop_sources.h (+9/-0)
src/server/compositor/default_display_buffer_compositor.cpp (+3/-3)
src/server/glib_main_loop_sources.cpp (+5/-5)
To merge this branch: bzr merge lp:~3v1n0/mir/compilation-fixes-trusty
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alexandros Frantzis (community) Approve
Alan Griffiths Approve
Daniel van Vugt Approve
Review via email: mp+248893@code.launchpad.net

Commit message

Mir: Fix compilation when using clang/g++ on trusty

Description of the change

Mostly remove the curly brackets on initialization lists, and make sure we ignore deprecated-register errors when using clang.

This fixes compilation with both g++ and clang++ in trusty, but not the linking issue in g++ (as per bug #1418962)

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. I haven't checked trusty in a while.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

If we intend to support trusty then there ought to be an automated build to pick these things up.

review: Approve
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> If we intend to support trusty then there ought to be an automated build to pick these things up.

+1

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Looks as though CI compiled a version of revision 2305 without the "#if defined(__clang__)" guards.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/server_example_window_management.cpp'
2--- examples/server_example_window_management.cpp 2015-02-04 18:10:25 +0000
3+++ examples/server_example_window_management.cpp 2015-02-06 15:14:12 +0000
4@@ -71,7 +71,7 @@
5 std::shared_ptr<ms::PromptSessionManager> const& prompt_session_manager,
6 std::shared_ptr<msh::DisplayLayout> const& display_layout) :
7 AbstractShell(input_targeter, surface_coordinator, session_coordinator, prompt_session_manager),
8- FullscreenPlacementStrategy{display_layout}
9+ FullscreenPlacementStrategy(display_layout)
10 {
11 }
12
13
14=== modified file 'examples/server_example_window_management.h'
15--- examples/server_example_window_management.h 2015-01-30 16:39:24 +0000
16+++ examples/server_example_window_management.h 2015-02-06 15:14:12 +0000
17@@ -55,7 +55,7 @@
18 class WindowManagmentFactory
19 {
20 public:
21- explicit WindowManagmentFactory(Server& server) : server{server} {}
22+ explicit WindowManagmentFactory(Server& server) : server(server) {}
23
24 auto window_manager() -> std::shared_ptr<WindowManager>;
25
26
27=== modified file 'src/include/server/mir/glib_main_loop_sources.h'
28--- src/include/server/mir/glib_main_loop_sources.h 2015-01-21 07:34:50 +0000
29+++ src/include/server/mir/glib_main_loop_sources.h 2015-02-06 15:14:12 +0000
30@@ -29,8 +29,17 @@
31 #include <memory>
32 #include <unordered_map>
33
34+#if defined(__clang__)
35+#pragma clang diagnostic push
36+#pragma clang diagnostic ignored "-Wdeprecated-register"
37+#endif
38+
39 #include <glib.h>
40
41+#if defined(__clang__)
42+#pragma clang diagnostic pop
43+#endif
44+
45 namespace mir
46 {
47 namespace detail
48
49=== modified file 'src/server/compositor/default_display_buffer_compositor.cpp'
50--- src/server/compositor/default_display_buffer_compositor.cpp 2015-01-21 09:03:53 +0000
51+++ src/server/compositor/default_display_buffer_compositor.cpp 2015-02-06 15:14:12 +0000
52@@ -38,9 +38,9 @@
53 mg::DisplayBuffer& display_buffer,
54 std::shared_ptr<mc::Renderer> const& renderer,
55 std::shared_ptr<mc::CompositorReport> const& report) :
56- display_buffer{display_buffer},
57- renderer{renderer},
58- report{report}
59+ display_buffer(display_buffer),
60+ renderer(renderer),
61+ report(report)
62 {
63 }
64
65
66=== modified file 'src/server/glib_main_loop_sources.cpp'
67--- src/server/glib_main_loop_sources.cpp 2015-01-21 07:34:50 +0000
68+++ src/server/glib_main_loop_sources.cpp 2015-02-06 15:14:12 +0000
69@@ -80,14 +80,14 @@
70 md::GSourceHandle::GSourceHandle(
71 GSource* gsource,
72 std::function<void(GSource*)> const& pre_destruction_hook)
73- : gsource{gsource},
74- pre_destruction_hook{pre_destruction_hook}
75+ : gsource(gsource),
76+ pre_destruction_hook(pre_destruction_hook)
77 {
78 }
79
80 md::GSourceHandle::GSourceHandle(GSourceHandle&& other)
81- : gsource{std::move(other.gsource)},
82- pre_destruction_hook{std::move(other.pre_destruction_hook)}
83+ : gsource(std::move(other.gsource)),
84+ pre_destruction_hook(std::move(other.pre_destruction_hook))
85 {
86 other.gsource = nullptr;
87 other.pre_destruction_hook = [](GSource*){};
88@@ -495,7 +495,7 @@
89 std::array<std::atomic<int>,10> md::SignalSources::SourceRegistration::write_fds;
90
91 md::SignalSources::SignalSources(md::FdSources& fd_sources)
92- : fd_sources{fd_sources}
93+ : fd_sources(fd_sources)
94 {
95 int pipefd[2];
96

Subscribers

People subscribed via source and target branches