Mir

Merge lp:~hikiko/mir/mir.dest-tmp into lp:~mir-team/mir/trunk

Proposed by Eleni Maria Stea
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 759
Proposed branch: lp:~hikiko/mir/mir.dest-tmp
Merge into: lp:~mir-team/mir/trunk
Diff against target: 429 lines (+47/-13)
29 files modified
3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/HookRegistrar.hpp (+3/-0)
3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/Tag.hpp (+1/-0)
3rd_party/cucumber-cpp/include/cucumber-cpp/internal/step/StepManager.hpp (+3/-0)
CMakeLists.txt (+1/-1)
include/server/mir/compositor/buffer_allocation_strategy.h (+1/-1)
include/server/mir/compositor/buffer_stream_surfaces.h (+0/-1)
include/server/mir/frontend/session_mediator_report.h (+2/-0)
include/server/mir/graphics/display.h (+1/-1)
include/server/mir/graphics/display_report.h (+1/-1)
include/server/mir/graphics/platform.h (+3/-0)
include/server/mir/graphics/viewable_area.h (+1/-1)
include/server/mir/options/option.h (+1/-1)
include/server/mir/server_configuration.h (+1/-1)
include/server/mir/surfaces/buffer_stream.h (+2/-0)
include/test/mir_test_doubles/mock_android_alloc_device.h (+1/-0)
include/test/mir_test_doubles/mock_android_registrar.h (+1/-0)
include/test/mir_test_framework/testing_process_manager.h (+1/-0)
src/client/aging_buffer.h (+1/-1)
src/client/android/android_registrar.h (+2/-0)
src/client/client_platform.h (+2/-0)
src/server/compositor/rw_lock.h (+4/-0)
src/server/frontend/message_processor.h (+2/-2)
src/server/frontend/socket_session.cpp (+0/-1)
src/server/graphics/gbm/gbm_display.cpp (+3/-0)
src/server/graphics/gbm/gbm_platform.cpp (+0/-1)
tests/integration-tests/compositor/multithread_harness.h (+3/-0)
tests/unit-tests/client/android/test_client_android_registrar.cpp (+1/-0)
tests/unit-tests/graphics/android/test_android_framebuffer_window.cpp (+3/-0)
tests/unit-tests/test_gmock_fixes.cpp (+2/-0)
To merge this branch: bzr merge lp:~hikiko/mir/mir.dest-tmp
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Alan Griffiths Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+168934@code.launchpad.net
To post a comment you must log in.
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 :

139 - ~Display() = default;
140 + virtual ~Display() {}

296 + virtual ~MirBasicRpcChannel();

309 + virtual ~MirSocketRpcChannel();

335 + virtual ~ReadLock(){}

344 + virtual ~WriteLock(){}

414 + virtual ~SynchronizerController() {}

Missing "TODO make noexcept" (unless it can be done already).

~~~~

321 - virtual ~BufferSwapperMaster() noexcept {}
322 + virtual ~BufferSwapperMaster() {}

Looks like a backward step

~~~~

435 + virtual ~Interface() {}
...
442 + virtual ~MockImplementation() {}

As you're changing both classes you can put the "default" and "noexcept" in there.

review: Needs Fixing
Revision history for this message
Kevin DuBois (kdub) wrote :

390 +//do not remove this empty destructor (unique_ptr)
seems self-evident to anyone who would try to remove the destructor :)

Revision history for this message
Eleni Maria Stea (hikiko) wrote :

@Kevin, I just added the comment because of this: https://code.launchpad.net/~hikiko/mir/mir.fix-missing-virtual-destructors/+merge/165464/comments/367371 but I will remove it! :)

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

97 - ~BufferStreamSurfaces();
98 + virtual ~BufferStreamSurfaces();

Not needed - this is not a base class

263 - ~AgingBuffer() noexcept {};
264 + virtual ~AgingBuffer() noexcept {}

Not needed - this is not a base class

276 - ~AndroidClientBuffer() noexcept;
277 + virtual ~AndroidClientBuffer() noexcept;

Not needed - this is not a base class

315 - ~MirBasicRpcChannel();
316 + virtual ~MirBasicRpcChannel();

Not needed - this is not a base class

328 - ~MirSocketRpcChannel();
329 + virtual ~MirSocketRpcChannel();

Not needed - this is not a base class

341 - virtual ~BufferBundle() noexcept {}
342 + virtual ~BufferBundle() {}

Looks like a backward step

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Correction: These _are_ base classes so need "virtual"...
MirBasicRpcChannel
AgingBuffer

But yeah, other non-base classes should not be changed...
BufferStreamSurfaces
AndroidClientBuffer
MirSocketRpcChannel

review: Needs Fixing
Revision history for this message
Eleni Maria Stea (hikiko) wrote :

@Daniel: I only added "virtual" to the accessible virtual destructors (based on the gcc errors): BufferStreamSurfaces, AndroidClientBuffer and MirSocketRpcChannel were accessible when I cross-compiled the branch.

@Alan: I am checking out if these changes were necessary and why.

Revision history for this message
Eleni Maria Stea (hikiko) wrote :

@Alan, @Daniel thanks, I fixed the:
BufferStreamSurfaces, AgingBuffer, AndroidClientBuffer, MirBasicRpcChannel, MirSocketRpcChannel

The noexcept was removed from BasicBundle to solve the looser specifier error we get because of that: https://code.launchpad.net/~hikiko/mir/mir.fix-virt-destructorS/+merge/167705/comments/372088 in gcc

Specifically:
[...]
In file included from /home/eleni/staging/destructors/mir.dest-tmp/src/server/compositor/switching_bundle.cpp:22:0:
/home/eleni/staging/destructors/mir.dest-tmp/src/server/compositor/switching_bundle.h:37:7: error: looser throw specifier for ‘virtual mir::compositor::SwitchingBundle::~SwitchingBundle()
In file included from /home/eleni/staging/destructors/mir.dest-tmp/src/server/compositor/switching_bundle.h:23:0,
                 from /home/eleni/staging/destructors/mir.dest-tmp/src/server/compositor/switching_bundle.cpp:22:
/home/eleni/staging/destructors/mir.dest-tmp/src/server/compositor/buffer_bundle.h:35:13: error: overriding ‘virtual mir::compositor::BufferBundle::~BufferBundle() noexcept (true)’
[...]

If I put the noexcept back I'll have to add virtual noexcept destructors to all the classes that inherit from it and the diff will be even bigger - if that's not a problem I can make the change (but it was already discussed and the suggestion was to remove the noexcept/default from base classes)

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

> The noexcept was removed from BasicBundle to solve the looser specifier error
> we get because of that: https://code.launchpad.net/~hikiko/mir/mir.fix-virt-
> destructorS/+merge/167705/comments/372088 in gcc
...
> If I put the noexcept back I'll have to add virtual noexcept destructors to
> all the classes that inherit from it and the diff will be even bigger - if
> that's not a problem I can make the change (but it was already discussed and
> the suggestion was to remove the noexcept/default from base classes)

On trunk the code is already compiling with noexcept (and without changes to other classes).

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

> > The noexcept was removed from BasicBundle to solve the looser specifier
> error
> > we get because of that: https://code.launchpad.net/~hikiko/mir/mir.fix-virt-
> > destructorS/+merge/167705/comments/372088 in gcc
> ...
> > If I put the noexcept back I'll have to add virtual noexcept destructors to
> > all the classes that inherit from it and the diff will be even bigger - if
> > that's not a problem I can make the change (but it was already discussed and
> > the suggestion was to remove the noexcept/default from base classes)
>
> On trunk the code is already compiling with noexcept (and without changes to
> other classes).

The change that causes these errors is:

314 + virtual ~ReadLock(){}
..
323 + virtual ~WriteLock(){}

If you use = default on the above lines you don't need to change BufferBundle

review: Needs Fixing
Revision history for this message
Eleni Maria Stea (hikiko) wrote :

fixed

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

413 + virtual ~ANativeWindowInterface() {}
...
421 + virtual ~MockANativeWindow() {}

As you're already changing both classes you should put the "default" and "noexcept" in there now.

~~~~

434 + virtual ~Interface() {}
...
441 + virtual ~MockImplementation() {}

As you're already changing both classes you should put the "default" and "noexcept" in there now.

~~~~

135 + virtual ~Display() {}
212 + virtual ~BufferStream() {}
225 + virtual ~ICSAllocInterface() {}

Missing "TODO make noexcept"

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

1. Not base classes, should not be virtual:
+ virtual ~SingleStepMatch() {}
+ virtual ~MockAndroidRegistrar() noexcept {}
+ virtual ~MockANativeWindow() {}
+ virtual ~MockImplementation() {}

2. This change is pointless, because -Wall already includes -Wnon-virtual-dtor, according to the docs...
68 -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall -fno-strict-aliasing -pedantic -Wextra -fPIC")
69 +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall -fno-strict-aliasing -pedantic -Wnon-virtual-dtor -Wextra -fPIC")

3. Is this a mistake?
81 -protected:

4. Pointless whitespace changes:
96 -
344 -
368 -

5. Pointless comment:
356 +//do not remove this empty destructor (unique_ptr)
Because you can't accidentally remove the empty virtual destructor without getting a linker error.

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

> 5. Pointless comment:
> 356 +//do not remove this empty destructor (unique_ptr)

The situation is that we need to have a destructor defined in the source file, instead of in the header (including the compiler generated one), for unique_ptr to an incomplete type to work. The comment could have more details about what is going on, to avoid the "pointless comment" concerns.

I am ok with not having any comment, although that could mean that in the future someone may be tempted to clean this up, only to find that they have wasted their time in vain.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Well, even with my dated C++ expertise I know that empty virtual destructors are useful things, and need to be kept, even empty.

I would hope that knowledge comes with the territory.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Eleni Maria Stea (hikiko) wrote :

fixed :)

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

Not fixed :(

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

> Not fixed :(

Too terse?

106 - virtual ~BufferSwapper() = default;
107 + virtual ~BufferSwapper() {/* TODO: make nothrow */}

See above comments about BufferBundle (the previous name of BufferSwapper)

210 + virtual ~BufferStream() {}

Missing "TODO make noexcept" - also part of the BufferXXX renames

413 + virtual ~ANativeWindowInterface() {}
421 + ~MockANativeWindow() {}
434 + virtual ~Interface() {}
441 + ~MockImplementation() {}

See above comments about these

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

See previous comments.

Also, empty non-virtual destructors have no value:
421 + ~MockANativeWindow() {}
422 +

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

39 + ~SingleStepMatch() {}

Why?

421 + virtual ~Interface() {/* TODO: make nothrow */}

can be "= default"

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

OK

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

1. I think we went off topic when noexcept was added to:
+ virtual ~MockAndroidRegistrar() {}
+ virtual ~MockANativeWindow() {}
+ virtual ~MockImplementation() {}
That really should be a separate proposal as this one was meant to be just about fixing virtual destructors... ?

2. This change is still unnecessary as it's already included in -Wall:
60 -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall -fno-strict-aliasing -pedantic -Wextra -fPIC")
61 +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall -fno-strict-aliasing -pedantic -Wnon-virtual-dtor -Wextra -fPIC")
Making the global CMAKE_CXX_FLAGS unnecessarily more complex is something to avoid.

3. Various blank lines have been added and removed. And in some cases they're the only change made to a file, so should be undone.

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh, I was wrong about -Wnon-virtual-dtor because I was looking at the wrong man-page. Please ignore my point #2 above.

Revision history for this message
Eleni Maria Stea (hikiko) wrote :

@Daniel: thanks

> 1. I think we went off topic when noexcept was added to:
> + virtual ~MockAndroidRegistrar() {}
> + virtual ~MockANativeWindow() {}
> + virtual ~MockImplementation() {}
> That really should be a separate proposal as this one was meant to be just
> about fixing virtual destructors... ?

If you don't add the noexcept and you use = default in the parent you get a compile error in gcc because of these:
http://stackoverflow.com/questions/11497252/default-destructor-nothrow
https://code.launchpad.net/~hikiko/mir/mir.fix-virt-destructorS/+merge/167705/comments/372088
https://code.launchpad.net/~hikiko/mir/mir.fix-missing-virtual-destructors/+merge/165464/comments/368890

>
> 2. This change is still unnecessary as it's already included in -Wall:
> 60 -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall
> -fno-strict-aliasing -pedantic -Wextra -fPIC")
> 61 +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall
> -fno-strict-aliasing -pedantic -Wnon-virtual-dtor -Wextra -fPIC")
> Making the global CMAKE_CXX_FLAGS unnecessarily more complex is something to
> avoid.
>
ok, you corrected yourself (https://code.launchpad.net/~hikiko/mir/mir.dest-tmp/+merge/168934/comments/379703)

> 3. Various blank lines have been added and removed. And in some cases they're
> the only change made to a file, so should be undone.

I just leave a new line after the constructors-destructors "block" of lines when there are other functions that follow... The only empty line introduced in an empty file is 144 and is there after merge to trunk/resolve (sorry!). But anyway I'll remove all the empty lines...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, I've used enough of your time. Approved.

review: Approve
Revision history for this message
Eleni Maria Stea (hikiko) wrote :

I removed the empty lines :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/HookRegistrar.hpp'
2--- 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/HookRegistrar.hpp 2013-01-03 21:26:48 +0000
3+++ 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/HookRegistrar.hpp 2013-06-19 10:10:36 +0000
4@@ -15,11 +15,14 @@
5
6 class CallableStep {
7 public:
8+ virtual ~CallableStep() {}
9 virtual void call() = 0;
10 };
11
12 class Hook {
13 public:
14+ virtual ~Hook() {}
15+
16 void setTags(const std::string &csvTagNotation);
17 virtual void invokeHook(Scenario *scenario);
18 virtual void skipHook();
19
20=== modified file '3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/Tag.hpp'
21--- 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/Tag.hpp 2013-01-03 21:26:48 +0000
22+++ 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/Tag.hpp 2013-06-19 10:10:36 +0000
23@@ -14,6 +14,7 @@
24
25 class TagExpression {
26 public:
27+ virtual ~TagExpression() {}
28 typedef std::vector<std::string> tag_list;
29
30 virtual bool matches(const tag_list &tags) = 0;
31
32=== modified file '3rd_party/cucumber-cpp/include/cucumber-cpp/internal/step/StepManager.hpp'
33--- 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/step/StepManager.hpp 2013-01-03 21:26:48 +0000
34+++ 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/step/StepManager.hpp 2013-06-19 10:10:36 +0000
35@@ -100,6 +100,8 @@
36 class StepInfo {
37 public:
38 StepInfo(const std::string &stepMatcher, const std::string source);
39+ virtual ~StepInfo() {}
40+
41 SingleStepMatch matches(const std::string &stepDescription);
42 virtual InvokeResult invokeStep(const InvokeArgs * pArgs) = 0;
43
44@@ -111,6 +113,7 @@
45
46 class BasicStep {
47 public:
48+ virtual ~BasicStep() {}
49 InvokeResult invoke(const InvokeArgs *pArgs);
50
51 protected:
52
53=== modified file 'CMakeLists.txt'
54--- CMakeLists.txt 2013-06-18 14:04:37 +0000
55+++ CMakeLists.txt 2013-06-19 10:10:36 +0000
56@@ -42,7 +42,7 @@
57 include (cmake/PrePush.cmake)
58
59 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Werror -Wall -pedantic -Wextra -fPIC")
60-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall -fno-strict-aliasing -pedantic -Wextra -fPIC")
61+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall -fno-strict-aliasing -pedantic -Wnon-virtual-dtor -Wextra -fPIC")
62 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
63
64 #####################################################################
65
66=== modified file 'include/server/mir/compositor/buffer_allocation_strategy.h'
67--- include/server/mir/compositor/buffer_allocation_strategy.h 2013-06-11 14:27:33 +0000
68+++ include/server/mir/compositor/buffer_allocation_strategy.h 2013-06-19 10:10:36 +0000
69@@ -52,7 +52,7 @@
70
71 protected:
72 BufferAllocationStrategy() {}
73- ~BufferAllocationStrategy() = default;
74+ virtual ~BufferAllocationStrategy() { /* TODO: make nothrow */ }
75
76 BufferAllocationStrategy(const BufferAllocationStrategy&);
77 BufferAllocationStrategy& operator=(const BufferAllocationStrategy& );
78
79=== modified file 'include/server/mir/compositor/buffer_stream_surfaces.h'
80--- include/server/mir/compositor/buffer_stream_surfaces.h 2013-06-13 10:40:42 +0000
81+++ include/server/mir/compositor/buffer_stream_surfaces.h 2013-06-19 10:10:36 +0000
82@@ -37,7 +37,6 @@
83 {
84 public:
85 BufferStreamSurfaces(std::shared_ptr<BufferBundle> const& swapper);
86-
87 ~BufferStreamSurfaces();
88
89 std::shared_ptr<Buffer> secure_client_buffer();
90
91=== modified file 'include/server/mir/frontend/session_mediator_report.h'
92--- include/server/mir/frontend/session_mediator_report.h 2013-05-30 03:50:54 +0000
93+++ include/server/mir/frontend/session_mediator_report.h 2013-06-19 10:10:36 +0000
94@@ -30,6 +30,8 @@
95 class SessionMediatorReport
96 {
97 public:
98+ virtual ~SessionMediatorReport() { /* TODO: make nothrow */ }
99+
100 virtual void session_connect_called(std::string const& app_name) = 0;
101
102 virtual void session_create_surface_called(std::string const& app_name) = 0;
103
104=== modified file 'include/server/mir/graphics/display.h'
105--- include/server/mir/graphics/display.h 2013-06-17 09:51:42 +0000
106+++ include/server/mir/graphics/display.h 2013-06-19 10:10:36 +0000
107@@ -100,7 +100,7 @@
108
109 protected:
110 Display() = default;
111- ~Display() = default;
112+ virtual ~Display() {/* TODO: make nothrow */}
113 private:
114 Display(Display const&) = delete;
115 Display& operator=(Display const&) = delete;
116
117=== modified file 'include/server/mir/graphics/display_report.h'
118--- include/server/mir/graphics/display_report.h 2013-05-10 18:16:51 +0000
119+++ include/server/mir/graphics/display_report.h 2013-06-19 10:10:36 +0000
120@@ -46,7 +46,7 @@
121
122 protected:
123 DisplayReport() = default;
124- ~DisplayReport() = default;
125+ virtual ~DisplayReport() { /* TODO: make nothrow */ }
126 DisplayReport(const DisplayReport&) = delete;
127 DisplayReport& operator=(const DisplayReport&) = delete;
128 };
129
130=== modified file 'include/server/mir/graphics/platform.h'
131--- include/server/mir/graphics/platform.h 2013-06-17 09:51:42 +0000
132+++ include/server/mir/graphics/platform.h 2013-06-19 10:10:36 +0000
133@@ -63,11 +63,14 @@
134 Platform(const Platform& p) = delete;
135 Platform& operator=(const Platform& p) = delete;
136
137+ virtual ~Platform() { /* TODO: make nothrow */ }
138+
139 /**
140 * Creates the buffer allocator subsystem.
141 *
142 * \param [in] buffer_initializer the object responsible for initializing the buffers
143 */
144+
145 virtual std::shared_ptr<compositor::GraphicBufferAllocator> create_buffer_allocator(
146 std::shared_ptr<BufferInitializer> const& buffer_initializer) = 0;
147
148
149=== modified file 'include/server/mir/graphics/viewable_area.h'
150--- include/server/mir/graphics/viewable_area.h 2013-04-24 05:22:20 +0000
151+++ include/server/mir/graphics/viewable_area.h 2013-06-19 10:10:36 +0000
152@@ -34,7 +34,7 @@
153
154 protected:
155 ViewableArea() = default;
156- ~ViewableArea() = default;
157+ virtual ~ViewableArea() { /* TODO: make nothrow */ }
158 private:
159 ViewableArea(ViewableArea const&) = delete;
160 ViewableArea& operator=(ViewableArea const&) = delete;
161
162=== modified file 'include/server/mir/options/option.h'
163--- include/server/mir/options/option.h 2013-04-24 05:22:20 +0000
164+++ include/server/mir/options/option.h 2013-06-19 10:10:36 +0000
165@@ -39,7 +39,7 @@
166
167 protected:
168 Option() = default;
169- ~Option() = default;
170+ virtual ~Option() { /* TODO: make nothrow */ }
171 Option(Option const&) = delete;
172 Option& operator=(Option const&) = delete;
173 };
174
175=== modified file 'include/server/mir/server_configuration.h'
176--- include/server/mir/server_configuration.h 2013-04-25 09:48:54 +0000
177+++ include/server/mir/server_configuration.h 2013-06-19 10:10:36 +0000
178@@ -60,7 +60,7 @@
179
180 protected:
181 ServerConfiguration() = default;
182- virtual ~ServerConfiguration() {}
183+ virtual ~ServerConfiguration() { /* TODO: make nothrow */ }
184
185 ServerConfiguration(ServerConfiguration const&) = delete;
186 ServerConfiguration& operator=(ServerConfiguration const&) = delete;
187
188=== modified file 'include/server/mir/surfaces/buffer_stream.h'
189--- include/server/mir/surfaces/buffer_stream.h 2013-06-13 10:40:42 +0000
190+++ include/server/mir/surfaces/buffer_stream.h 2013-06-19 10:10:36 +0000
191@@ -40,6 +40,8 @@
192 class BufferStream
193 {
194 public:
195+ virtual ~BufferStream() {/* TODO: make nothrow */}
196+
197 virtual std::shared_ptr<compositor::Buffer> secure_client_buffer() = 0;
198 virtual std::shared_ptr<surfaces::GraphicRegion> lock_back_buffer() = 0;
199 virtual geometry::PixelFormat get_stream_pixel_format() = 0;
200
201=== modified file 'include/test/mir_test_doubles/mock_android_alloc_device.h'
202--- include/test/mir_test_doubles/mock_android_alloc_device.h 2013-05-01 17:35:49 +0000
203+++ include/test/mir_test_doubles/mock_android_alloc_device.h 2013-06-19 10:10:36 +0000
204@@ -30,6 +30,7 @@
205 class ICSAllocInterface
206 {
207 public:
208+ virtual ~ICSAllocInterface() {/* TODO: make nothrow */}
209 virtual int alloc_interface(alloc_device_t* dev, int w, int h,
210 int format, int usage, buffer_handle_t* handle, int* stride) = 0;
211 virtual int free_interface(alloc_device_t* dev, buffer_handle_t handle) = 0;
212
213=== modified file 'include/test/mir_test_doubles/mock_android_registrar.h'
214--- include/test/mir_test_doubles/mock_android_registrar.h 2013-04-24 05:22:20 +0000
215+++ include/test/mir_test_doubles/mock_android_registrar.h 2013-06-19 10:10:36 +0000
216@@ -35,6 +35,7 @@
217 {
218 struct MockAndroidRegistrar : public client::android::AndroidRegistrar
219 {
220+ ~MockAndroidRegistrar() noexcept {}
221 MOCK_METHOD1(register_buffer, void(const native_handle_t*));
222 MOCK_METHOD1(unregister_buffer, void(const native_handle_t*));
223 MOCK_METHOD2(secure_for_cpu, std::shared_ptr<char>(std::shared_ptr<const native_handle_t>, geometry::Rectangle));
224
225=== modified file 'include/test/mir_test_framework/testing_process_manager.h'
226--- include/test/mir_test_framework/testing_process_manager.h 2013-04-24 05:22:20 +0000
227+++ include/test/mir_test_framework/testing_process_manager.h 2013-06-19 10:10:36 +0000
228@@ -40,6 +40,7 @@
229
230 struct TestingClientConfiguration
231 {
232+ virtual ~TestingClientConfiguration() = default;
233 // Code to run in client process
234 virtual void exec() = 0;
235 };
236
237=== modified file 'src/client/aging_buffer.h'
238--- src/client/aging_buffer.h 2013-05-03 18:39:57 +0000
239+++ src/client/aging_buffer.h 2013-06-19 10:10:36 +0000
240@@ -30,7 +30,7 @@
241 {
242 public:
243 AgingBuffer();
244- ~AgingBuffer() noexcept {};
245+ ~AgingBuffer() noexcept {}
246
247 virtual uint32_t age() const;
248 virtual void increment_age();
249
250=== modified file 'src/client/android/android_registrar.h'
251--- src/client/android/android_registrar.h 2013-04-24 05:22:20 +0000
252+++ src/client/android/android_registrar.h 2013-06-19 10:10:36 +0000
253@@ -35,6 +35,8 @@
254 class AndroidRegistrar
255 {
256 public:
257+ virtual ~AndroidRegistrar() = default;
258+
259 virtual void register_buffer(const native_handle_t *handle) = 0;
260 virtual void unregister_buffer(const native_handle_t *handle) = 0;
261 virtual std::shared_ptr<char> secure_for_cpu(std::shared_ptr<const native_handle_t> handle, const geometry::Rectangle) = 0;
262
263=== modified file 'src/client/client_platform.h'
264--- src/client/client_platform.h 2013-06-17 09:51:42 +0000
265+++ src/client/client_platform.h 2013-06-19 10:10:36 +0000
266@@ -42,6 +42,8 @@
267 ClientPlatform(const ClientPlatform& p) = delete;
268 ClientPlatform& operator=(const ClientPlatform& p) = delete;
269
270+ virtual ~ClientPlatform() { /* TODO: make nothrow */ }
271+
272 virtual MirPlatformType platform_type() const = 0;
273 virtual std::shared_ptr<ClientBufferFactory> create_buffer_factory() = 0;
274 virtual std::shared_ptr<EGLNativeWindowType> create_egl_native_window(ClientSurface *surface) = 0;
275
276=== modified file 'src/server/compositor/rw_lock.h'
277--- src/server/compositor/rw_lock.h 2013-06-07 15:23:27 +0000
278+++ src/server/compositor/rw_lock.h 2013-06-19 10:10:36 +0000
279@@ -33,6 +33,8 @@
280 public:
281 void lock() { read_lock(); }
282 void unlock() { read_unlock(); }
283+
284+ virtual ~ReadLock() = default;
285 protected:
286 ReadLock()
287 {
288@@ -50,6 +52,8 @@
289 public:
290 void lock() { write_lock(); }
291 void unlock() { write_unlock(); }
292+
293+ virtual ~WriteLock() = default;
294 protected:
295 WriteLock()
296 {
297
298=== modified file 'src/server/frontend/message_processor.h'
299--- src/server/frontend/message_processor.h 2013-04-24 05:22:20 +0000
300+++ src/server/frontend/message_processor.h 2013-06-19 10:10:36 +0000
301@@ -37,7 +37,7 @@
302 virtual void send_fds(std::vector<int32_t> const& fd) = 0;
303 protected:
304 MessageSender() = default;
305- ~MessageSender() = default;
306+ virtual ~MessageSender() { /* TODO: make nothrow */ }
307 MessageSender(MessageSender const&) = delete;
308 MessageSender& operator=(MessageSender const&) = delete;
309 };
310@@ -47,7 +47,7 @@
311 virtual bool process_message(std::istream& msg) = 0;
312 protected:
313 MessageProcessor() = default;
314- ~MessageProcessor() = default;
315+ virtual ~MessageProcessor() = default;
316 MessageProcessor(MessageProcessor const&) = delete;
317 MessageProcessor& operator=(MessageProcessor const&) = delete;
318 };
319
320=== modified file 'src/server/frontend/socket_session.cpp'
321--- src/server/frontend/socket_session.cpp 2013-04-24 05:22:20 +0000
322+++ src/server/frontend/socket_session.cpp 2013-06-19 10:10:36 +0000
323@@ -27,7 +27,6 @@
324
325 namespace mfd = mir::frontend::detail;
326
327-
328 void mfd::SocketSession::send(std::string const& body)
329 {
330 const size_t size = body.size();
331
332=== modified file 'src/server/graphics/gbm/gbm_display.cpp'
333--- src/server/graphics/gbm/gbm_display.cpp 2013-06-12 10:27:50 +0000
334+++ src/server/graphics/gbm/gbm_display.cpp 2013-06-19 10:10:36 +0000
335@@ -87,6 +87,9 @@
336 shared_egl.make_current();
337 }
338
339+// please don't remove this empty destructor, it's here for the
340+// unique ptr!! if you accidentally remove it you will get a not
341+// so relevant linker error about some missing headers
342 mgg::GBMDisplay::~GBMDisplay()
343 {
344 }
345
346=== modified file 'src/server/graphics/gbm/gbm_platform.cpp'
347--- src/server/graphics/gbm/gbm_platform.cpp 2013-05-30 03:50:54 +0000
348+++ src/server/graphics/gbm/gbm_platform.cpp 2013-06-19 10:10:36 +0000
349@@ -17,7 +17,6 @@
350 */
351
352 #include "gbm_platform.h"
353-
354 #include "gbm_buffer_allocator.h"
355 #include "gbm_display.h"
356 #include "internal_client.h"
357
358=== modified file 'tests/integration-tests/compositor/multithread_harness.h'
359--- tests/integration-tests/compositor/multithread_harness.h 2013-01-11 23:47:40 +0000
360+++ tests/integration-tests/compositor/multithread_harness.h 2013-06-19 10:10:36 +0000
361@@ -32,6 +32,8 @@
362 class SynchronizerController
363 {
364 public:
365+ virtual ~SynchronizerController() {}
366+
367 virtual void ensure_child_is_waiting() = 0;
368 virtual void activate_waiting_child() = 0;
369 virtual void kill_thread() = 0;
370@@ -41,6 +43,7 @@
371 class SynchronizerSpawned
372 {
373 public:
374+ virtual ~SynchronizerSpawned() {}
375 virtual bool child_enter_wait() = 0;
376 virtual bool child_check_wait_request() = 0;
377 };
378
379=== modified file 'tests/unit-tests/client/android/test_client_android_registrar.cpp'
380--- tests/unit-tests/client/android/test_client_android_registrar.cpp 2013-04-24 05:22:20 +0000
381+++ tests/unit-tests/client/android/test_client_android_registrar.cpp 2013-06-19 10:10:36 +0000
382@@ -33,6 +33,7 @@
383 class ICSRegistrarInterface
384 {
385 public:
386+ virtual ~ICSRegistrarInterface() {}
387 virtual int registerBuffer_interface(struct gralloc_module_t const* module, buffer_handle_t handle) const = 0;
388 virtual int unregisterBuffer_interface(struct gralloc_module_t const* module, buffer_handle_t handle) const = 0;
389 virtual int lock_interface(struct gralloc_module_t const* module, buffer_handle_t handle,
390
391=== modified file 'tests/unit-tests/graphics/android/test_android_framebuffer_window.cpp'
392--- tests/unit-tests/graphics/android/test_android_framebuffer_window.cpp 2013-05-20 15:55:48 +0000
393+++ tests/unit-tests/graphics/android/test_android_framebuffer_window.cpp 2013-06-19 10:10:36 +0000
394@@ -31,6 +31,7 @@
395 class ANativeWindowInterface
396 {
397 public:
398+ virtual ~ANativeWindowInterface() = default;
399 virtual int query_interface(const ANativeWindow* win , int code, int* value) const = 0;
400 };
401
402@@ -51,6 +52,8 @@
403 Return(0)));
404 }
405
406+ ~MockANativeWindow() noexcept {}
407+
408 static int hook_query(const ANativeWindow* anw, int code, int *ret)
409 {
410 const MockANativeWindow* mocker = static_cast<const MockANativeWindow*>(anw);
411
412=== modified file 'tests/unit-tests/test_gmock_fixes.cpp'
413--- tests/unit-tests/test_gmock_fixes.cpp 2012-07-12 14:11:36 +0000
414+++ tests/unit-tests/test_gmock_fixes.cpp 2013-06-19 10:10:36 +0000
415@@ -26,12 +26,14 @@
416 {
417 struct Interface
418 {
419+ virtual ~Interface() = default;
420 virtual std::unique_ptr<int> function() const = 0;
421 };
422
423 struct MockImplementation : Interface
424 {
425 MOCK_CONST_METHOD0(function, std::unique_ptr<int>());
426+ ~MockImplementation() noexcept {}
427 };
428
429 MockImplementation mi;

Subscribers

People subscribed via source and target branches