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
=== modified file '3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/HookRegistrar.hpp'
--- 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/HookRegistrar.hpp 2013-01-03 21:26:48 +0000
+++ 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/HookRegistrar.hpp 2013-06-19 10:10:36 +0000
@@ -15,11 +15,14 @@
1515
16class CallableStep {16class CallableStep {
17public:17public:
18 virtual ~CallableStep() {}
18 virtual void call() = 0;19 virtual void call() = 0;
19};20};
2021
21class Hook {22class Hook {
22public:23public:
24 virtual ~Hook() {}
25
23 void setTags(const std::string &csvTagNotation);26 void setTags(const std::string &csvTagNotation);
24 virtual void invokeHook(Scenario *scenario);27 virtual void invokeHook(Scenario *scenario);
25 virtual void skipHook();28 virtual void skipHook();
2629
=== modified file '3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/Tag.hpp'
--- 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/Tag.hpp 2013-01-03 21:26:48 +0000
+++ 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/hook/Tag.hpp 2013-06-19 10:10:36 +0000
@@ -14,6 +14,7 @@
1414
15class TagExpression {15class TagExpression {
16public:16public:
17 virtual ~TagExpression() {}
17 typedef std::vector<std::string> tag_list;18 typedef std::vector<std::string> tag_list;
1819
19 virtual bool matches(const tag_list &tags) = 0;20 virtual bool matches(const tag_list &tags) = 0;
2021
=== modified file '3rd_party/cucumber-cpp/include/cucumber-cpp/internal/step/StepManager.hpp'
--- 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/step/StepManager.hpp 2013-01-03 21:26:48 +0000
+++ 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/step/StepManager.hpp 2013-06-19 10:10:36 +0000
@@ -100,6 +100,8 @@
100class StepInfo {100class StepInfo {
101public:101public:
102 StepInfo(const std::string &stepMatcher, const std::string source);102 StepInfo(const std::string &stepMatcher, const std::string source);
103 virtual ~StepInfo() {}
104
103 SingleStepMatch matches(const std::string &stepDescription);105 SingleStepMatch matches(const std::string &stepDescription);
104 virtual InvokeResult invokeStep(const InvokeArgs * pArgs) = 0;106 virtual InvokeResult invokeStep(const InvokeArgs * pArgs) = 0;
105107
@@ -111,6 +113,7 @@
111113
112class BasicStep {114class BasicStep {
113public:115public:
116 virtual ~BasicStep() {}
114 InvokeResult invoke(const InvokeArgs *pArgs);117 InvokeResult invoke(const InvokeArgs *pArgs);
115118
116protected:119protected:
117120
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-06-18 14:04:37 +0000
+++ CMakeLists.txt 2013-06-19 10:10:36 +0000
@@ -42,7 +42,7 @@
42include (cmake/PrePush.cmake)42include (cmake/PrePush.cmake)
4343
44set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Werror -Wall -pedantic -Wextra -fPIC")44set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Werror -Wall -pedantic -Wextra -fPIC")
45set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall -fno-strict-aliasing -pedantic -Wextra -fPIC")45set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall -fno-strict-aliasing -pedantic -Wnon-virtual-dtor -Wextra -fPIC")
46set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")46set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
4747
48#####################################################################48#####################################################################
4949
=== modified file 'include/server/mir/compositor/buffer_allocation_strategy.h'
--- include/server/mir/compositor/buffer_allocation_strategy.h 2013-06-11 14:27:33 +0000
+++ include/server/mir/compositor/buffer_allocation_strategy.h 2013-06-19 10:10:36 +0000
@@ -52,7 +52,7 @@
5252
53protected:53protected:
54 BufferAllocationStrategy() {}54 BufferAllocationStrategy() {}
55 ~BufferAllocationStrategy() = default;55 virtual ~BufferAllocationStrategy() { /* TODO: make nothrow */ }
5656
57 BufferAllocationStrategy(const BufferAllocationStrategy&);57 BufferAllocationStrategy(const BufferAllocationStrategy&);
58 BufferAllocationStrategy& operator=(const BufferAllocationStrategy& );58 BufferAllocationStrategy& operator=(const BufferAllocationStrategy& );
5959
=== modified file 'include/server/mir/compositor/buffer_stream_surfaces.h'
--- include/server/mir/compositor/buffer_stream_surfaces.h 2013-06-13 10:40:42 +0000
+++ include/server/mir/compositor/buffer_stream_surfaces.h 2013-06-19 10:10:36 +0000
@@ -37,7 +37,6 @@
37{37{
38public:38public:
39 BufferStreamSurfaces(std::shared_ptr<BufferBundle> const& swapper);39 BufferStreamSurfaces(std::shared_ptr<BufferBundle> const& swapper);
40
41 ~BufferStreamSurfaces();40 ~BufferStreamSurfaces();
4241
43 std::shared_ptr<Buffer> secure_client_buffer();42 std::shared_ptr<Buffer> secure_client_buffer();
4443
=== modified file 'include/server/mir/frontend/session_mediator_report.h'
--- include/server/mir/frontend/session_mediator_report.h 2013-05-30 03:50:54 +0000
+++ include/server/mir/frontend/session_mediator_report.h 2013-06-19 10:10:36 +0000
@@ -30,6 +30,8 @@
30class SessionMediatorReport30class SessionMediatorReport
31{31{
32public:32public:
33 virtual ~SessionMediatorReport() { /* TODO: make nothrow */ }
34
33 virtual void session_connect_called(std::string const& app_name) = 0;35 virtual void session_connect_called(std::string const& app_name) = 0;
3436
35 virtual void session_create_surface_called(std::string const& app_name) = 0;37 virtual void session_create_surface_called(std::string const& app_name) = 0;
3638
=== modified file 'include/server/mir/graphics/display.h'
--- include/server/mir/graphics/display.h 2013-06-17 09:51:42 +0000
+++ include/server/mir/graphics/display.h 2013-06-19 10:10:36 +0000
@@ -100,7 +100,7 @@
100100
101protected:101protected:
102 Display() = default;102 Display() = default;
103 ~Display() = default;103 virtual ~Display() {/* TODO: make nothrow */}
104private:104private:
105 Display(Display const&) = delete;105 Display(Display const&) = delete;
106 Display& operator=(Display const&) = delete;106 Display& operator=(Display const&) = delete;
107107
=== modified file 'include/server/mir/graphics/display_report.h'
--- include/server/mir/graphics/display_report.h 2013-05-10 18:16:51 +0000
+++ include/server/mir/graphics/display_report.h 2013-06-19 10:10:36 +0000
@@ -46,7 +46,7 @@
4646
47protected:47protected:
48 DisplayReport() = default;48 DisplayReport() = default;
49 ~DisplayReport() = default;49 virtual ~DisplayReport() { /* TODO: make nothrow */ }
50 DisplayReport(const DisplayReport&) = delete;50 DisplayReport(const DisplayReport&) = delete;
51 DisplayReport& operator=(const DisplayReport&) = delete;51 DisplayReport& operator=(const DisplayReport&) = delete;
52};52};
5353
=== modified file 'include/server/mir/graphics/platform.h'
--- include/server/mir/graphics/platform.h 2013-06-17 09:51:42 +0000
+++ include/server/mir/graphics/platform.h 2013-06-19 10:10:36 +0000
@@ -63,11 +63,14 @@
63 Platform(const Platform& p) = delete;63 Platform(const Platform& p) = delete;
64 Platform& operator=(const Platform& p) = delete;64 Platform& operator=(const Platform& p) = delete;
6565
66 virtual ~Platform() { /* TODO: make nothrow */ }
67
66 /**68 /**
67 * Creates the buffer allocator subsystem.69 * Creates the buffer allocator subsystem.
68 *70 *
69 * \param [in] buffer_initializer the object responsible for initializing the buffers71 * \param [in] buffer_initializer the object responsible for initializing the buffers
70 */72 */
73
71 virtual std::shared_ptr<compositor::GraphicBufferAllocator> create_buffer_allocator(74 virtual std::shared_ptr<compositor::GraphicBufferAllocator> create_buffer_allocator(
72 std::shared_ptr<BufferInitializer> const& buffer_initializer) = 0;75 std::shared_ptr<BufferInitializer> const& buffer_initializer) = 0;
7376
7477
=== modified file 'include/server/mir/graphics/viewable_area.h'
--- include/server/mir/graphics/viewable_area.h 2013-04-24 05:22:20 +0000
+++ include/server/mir/graphics/viewable_area.h 2013-06-19 10:10:36 +0000
@@ -34,7 +34,7 @@
3434
35protected:35protected:
36 ViewableArea() = default;36 ViewableArea() = default;
37 ~ViewableArea() = default;37 virtual ~ViewableArea() { /* TODO: make nothrow */ }
38private:38private:
39 ViewableArea(ViewableArea const&) = delete;39 ViewableArea(ViewableArea const&) = delete;
40 ViewableArea& operator=(ViewableArea const&) = delete;40 ViewableArea& operator=(ViewableArea const&) = delete;
4141
=== modified file 'include/server/mir/options/option.h'
--- include/server/mir/options/option.h 2013-04-24 05:22:20 +0000
+++ include/server/mir/options/option.h 2013-06-19 10:10:36 +0000
@@ -39,7 +39,7 @@
3939
40protected:40protected:
41 Option() = default;41 Option() = default;
42 ~Option() = default;42 virtual ~Option() { /* TODO: make nothrow */ }
43 Option(Option const&) = delete;43 Option(Option const&) = delete;
44 Option& operator=(Option const&) = delete;44 Option& operator=(Option const&) = delete;
45};45};
4646
=== modified file 'include/server/mir/server_configuration.h'
--- include/server/mir/server_configuration.h 2013-04-25 09:48:54 +0000
+++ include/server/mir/server_configuration.h 2013-06-19 10:10:36 +0000
@@ -60,7 +60,7 @@
6060
61protected:61protected:
62 ServerConfiguration() = default;62 ServerConfiguration() = default;
63 virtual ~ServerConfiguration() {}63 virtual ~ServerConfiguration() { /* TODO: make nothrow */ }
6464
65 ServerConfiguration(ServerConfiguration const&) = delete;65 ServerConfiguration(ServerConfiguration const&) = delete;
66 ServerConfiguration& operator=(ServerConfiguration const&) = delete;66 ServerConfiguration& operator=(ServerConfiguration const&) = delete;
6767
=== modified file 'include/server/mir/surfaces/buffer_stream.h'
--- include/server/mir/surfaces/buffer_stream.h 2013-06-13 10:40:42 +0000
+++ include/server/mir/surfaces/buffer_stream.h 2013-06-19 10:10:36 +0000
@@ -40,6 +40,8 @@
40class BufferStream40class BufferStream
41{41{
42public:42public:
43 virtual ~BufferStream() {/* TODO: make nothrow */}
44
43 virtual std::shared_ptr<compositor::Buffer> secure_client_buffer() = 0;45 virtual std::shared_ptr<compositor::Buffer> secure_client_buffer() = 0;
44 virtual std::shared_ptr<surfaces::GraphicRegion> lock_back_buffer() = 0;46 virtual std::shared_ptr<surfaces::GraphicRegion> lock_back_buffer() = 0;
45 virtual geometry::PixelFormat get_stream_pixel_format() = 0;47 virtual geometry::PixelFormat get_stream_pixel_format() = 0;
4648
=== modified file 'include/test/mir_test_doubles/mock_android_alloc_device.h'
--- include/test/mir_test_doubles/mock_android_alloc_device.h 2013-05-01 17:35:49 +0000
+++ include/test/mir_test_doubles/mock_android_alloc_device.h 2013-06-19 10:10:36 +0000
@@ -30,6 +30,7 @@
30class ICSAllocInterface30class ICSAllocInterface
31{31{
32public:32public:
33 virtual ~ICSAllocInterface() {/* TODO: make nothrow */}
33 virtual int alloc_interface(alloc_device_t* dev, int w, int h,34 virtual int alloc_interface(alloc_device_t* dev, int w, int h,
34 int format, int usage, buffer_handle_t* handle, int* stride) = 0;35 int format, int usage, buffer_handle_t* handle, int* stride) = 0;
35 virtual int free_interface(alloc_device_t* dev, buffer_handle_t handle) = 0;36 virtual int free_interface(alloc_device_t* dev, buffer_handle_t handle) = 0;
3637
=== modified file 'include/test/mir_test_doubles/mock_android_registrar.h'
--- include/test/mir_test_doubles/mock_android_registrar.h 2013-04-24 05:22:20 +0000
+++ include/test/mir_test_doubles/mock_android_registrar.h 2013-06-19 10:10:36 +0000
@@ -35,6 +35,7 @@
35{35{
36struct MockAndroidRegistrar : public client::android::AndroidRegistrar36struct MockAndroidRegistrar : public client::android::AndroidRegistrar
37{37{
38 ~MockAndroidRegistrar() noexcept {}
38 MOCK_METHOD1(register_buffer, void(const native_handle_t*));39 MOCK_METHOD1(register_buffer, void(const native_handle_t*));
39 MOCK_METHOD1(unregister_buffer, void(const native_handle_t*));40 MOCK_METHOD1(unregister_buffer, void(const native_handle_t*));
40 MOCK_METHOD2(secure_for_cpu, std::shared_ptr<char>(std::shared_ptr<const native_handle_t>, geometry::Rectangle));41 MOCK_METHOD2(secure_for_cpu, std::shared_ptr<char>(std::shared_ptr<const native_handle_t>, geometry::Rectangle));
4142
=== modified file 'include/test/mir_test_framework/testing_process_manager.h'
--- include/test/mir_test_framework/testing_process_manager.h 2013-04-24 05:22:20 +0000
+++ include/test/mir_test_framework/testing_process_manager.h 2013-06-19 10:10:36 +0000
@@ -40,6 +40,7 @@
4040
41struct TestingClientConfiguration41struct TestingClientConfiguration
42{42{
43 virtual ~TestingClientConfiguration() = default;
43 // Code to run in client process44 // Code to run in client process
44 virtual void exec() = 0;45 virtual void exec() = 0;
45};46};
4647
=== modified file 'src/client/aging_buffer.h'
--- src/client/aging_buffer.h 2013-05-03 18:39:57 +0000
+++ src/client/aging_buffer.h 2013-06-19 10:10:36 +0000
@@ -30,7 +30,7 @@
30{30{
31public:31public:
32 AgingBuffer();32 AgingBuffer();
33 ~AgingBuffer() noexcept {};33 ~AgingBuffer() noexcept {}
3434
35 virtual uint32_t age() const;35 virtual uint32_t age() const;
36 virtual void increment_age();36 virtual void increment_age();
3737
=== modified file 'src/client/android/android_registrar.h'
--- src/client/android/android_registrar.h 2013-04-24 05:22:20 +0000
+++ src/client/android/android_registrar.h 2013-06-19 10:10:36 +0000
@@ -35,6 +35,8 @@
35class AndroidRegistrar35class AndroidRegistrar
36{36{
37public:37public:
38 virtual ~AndroidRegistrar() = default;
39
38 virtual void register_buffer(const native_handle_t *handle) = 0;40 virtual void register_buffer(const native_handle_t *handle) = 0;
39 virtual void unregister_buffer(const native_handle_t *handle) = 0;41 virtual void unregister_buffer(const native_handle_t *handle) = 0;
40 virtual std::shared_ptr<char> secure_for_cpu(std::shared_ptr<const native_handle_t> handle, const geometry::Rectangle) = 0;42 virtual std::shared_ptr<char> secure_for_cpu(std::shared_ptr<const native_handle_t> handle, const geometry::Rectangle) = 0;
4143
=== modified file 'src/client/client_platform.h'
--- src/client/client_platform.h 2013-06-17 09:51:42 +0000
+++ src/client/client_platform.h 2013-06-19 10:10:36 +0000
@@ -42,6 +42,8 @@
42 ClientPlatform(const ClientPlatform& p) = delete;42 ClientPlatform(const ClientPlatform& p) = delete;
43 ClientPlatform& operator=(const ClientPlatform& p) = delete;43 ClientPlatform& operator=(const ClientPlatform& p) = delete;
4444
45 virtual ~ClientPlatform() { /* TODO: make nothrow */ }
46
45 virtual MirPlatformType platform_type() const = 0; 47 virtual MirPlatformType platform_type() const = 0;
46 virtual std::shared_ptr<ClientBufferFactory> create_buffer_factory() = 0;48 virtual std::shared_ptr<ClientBufferFactory> create_buffer_factory() = 0;
47 virtual std::shared_ptr<EGLNativeWindowType> create_egl_native_window(ClientSurface *surface) = 0;49 virtual std::shared_ptr<EGLNativeWindowType> create_egl_native_window(ClientSurface *surface) = 0;
4850
=== modified file 'src/server/compositor/rw_lock.h'
--- src/server/compositor/rw_lock.h 2013-06-07 15:23:27 +0000
+++ src/server/compositor/rw_lock.h 2013-06-19 10:10:36 +0000
@@ -33,6 +33,8 @@
33public:33public:
34 void lock() { read_lock(); }34 void lock() { read_lock(); }
35 void unlock() { read_unlock(); }35 void unlock() { read_unlock(); }
36
37 virtual ~ReadLock() = default;
36protected:38protected:
37 ReadLock()39 ReadLock()
38 {40 {
@@ -50,6 +52,8 @@
50public:52public:
51 void lock() { write_lock(); }53 void lock() { write_lock(); }
52 void unlock() { write_unlock(); }54 void unlock() { write_unlock(); }
55
56 virtual ~WriteLock() = default;
53protected:57protected:
54 WriteLock()58 WriteLock()
55 {59 {
5660
=== modified file 'src/server/frontend/message_processor.h'
--- src/server/frontend/message_processor.h 2013-04-24 05:22:20 +0000
+++ src/server/frontend/message_processor.h 2013-06-19 10:10:36 +0000
@@ -37,7 +37,7 @@
37 virtual void send_fds(std::vector<int32_t> const& fd) = 0;37 virtual void send_fds(std::vector<int32_t> const& fd) = 0;
38protected:38protected:
39 MessageSender() = default;39 MessageSender() = default;
40 ~MessageSender() = default;40 virtual ~MessageSender() { /* TODO: make nothrow */ }
41 MessageSender(MessageSender const&) = delete;41 MessageSender(MessageSender const&) = delete;
42 MessageSender& operator=(MessageSender const&) = delete;42 MessageSender& operator=(MessageSender const&) = delete;
43};43};
@@ -47,7 +47,7 @@
47 virtual bool process_message(std::istream& msg) = 0;47 virtual bool process_message(std::istream& msg) = 0;
48protected:48protected:
49 MessageProcessor() = default;49 MessageProcessor() = default;
50 ~MessageProcessor() = default;50 virtual ~MessageProcessor() = default;
51 MessageProcessor(MessageProcessor const&) = delete;51 MessageProcessor(MessageProcessor const&) = delete;
52 MessageProcessor& operator=(MessageProcessor const&) = delete;52 MessageProcessor& operator=(MessageProcessor const&) = delete;
53};53};
5454
=== modified file 'src/server/frontend/socket_session.cpp'
--- src/server/frontend/socket_session.cpp 2013-04-24 05:22:20 +0000
+++ src/server/frontend/socket_session.cpp 2013-06-19 10:10:36 +0000
@@ -27,7 +27,6 @@
2727
28namespace mfd = mir::frontend::detail;28namespace mfd = mir::frontend::detail;
2929
30
31void mfd::SocketSession::send(std::string const& body)30void mfd::SocketSession::send(std::string const& body)
32{31{
33 const size_t size = body.size();32 const size_t size = body.size();
3433
=== modified file 'src/server/graphics/gbm/gbm_display.cpp'
--- src/server/graphics/gbm/gbm_display.cpp 2013-06-12 10:27:50 +0000
+++ src/server/graphics/gbm/gbm_display.cpp 2013-06-19 10:10:36 +0000
@@ -87,6 +87,9 @@
87 shared_egl.make_current();87 shared_egl.make_current();
88}88}
8989
90// please don't remove this empty destructor, it's here for the
91// unique ptr!! if you accidentally remove it you will get a not
92// so relevant linker error about some missing headers
90mgg::GBMDisplay::~GBMDisplay()93mgg::GBMDisplay::~GBMDisplay()
91{94{
92}95}
9396
=== modified file 'src/server/graphics/gbm/gbm_platform.cpp'
--- src/server/graphics/gbm/gbm_platform.cpp 2013-05-30 03:50:54 +0000
+++ src/server/graphics/gbm/gbm_platform.cpp 2013-06-19 10:10:36 +0000
@@ -17,7 +17,6 @@
17 */17 */
1818
19#include "gbm_platform.h"19#include "gbm_platform.h"
20
21#include "gbm_buffer_allocator.h"20#include "gbm_buffer_allocator.h"
22#include "gbm_display.h"21#include "gbm_display.h"
23#include "internal_client.h"22#include "internal_client.h"
2423
=== modified file 'tests/integration-tests/compositor/multithread_harness.h'
--- tests/integration-tests/compositor/multithread_harness.h 2013-01-11 23:47:40 +0000
+++ tests/integration-tests/compositor/multithread_harness.h 2013-06-19 10:10:36 +0000
@@ -32,6 +32,8 @@
32class SynchronizerController32class SynchronizerController
33{33{
34public:34public:
35 virtual ~SynchronizerController() {}
36
35 virtual void ensure_child_is_waiting() = 0;37 virtual void ensure_child_is_waiting() = 0;
36 virtual void activate_waiting_child() = 0;38 virtual void activate_waiting_child() = 0;
37 virtual void kill_thread() = 0;39 virtual void kill_thread() = 0;
@@ -41,6 +43,7 @@
41class SynchronizerSpawned43class SynchronizerSpawned
42{44{
43public:45public:
46 virtual ~SynchronizerSpawned() {}
44 virtual bool child_enter_wait() = 0;47 virtual bool child_enter_wait() = 0;
45 virtual bool child_check_wait_request() = 0;48 virtual bool child_check_wait_request() = 0;
46};49};
4750
=== modified file 'tests/unit-tests/client/android/test_client_android_registrar.cpp'
--- tests/unit-tests/client/android/test_client_android_registrar.cpp 2013-04-24 05:22:20 +0000
+++ tests/unit-tests/client/android/test_client_android_registrar.cpp 2013-06-19 10:10:36 +0000
@@ -33,6 +33,7 @@
33class ICSRegistrarInterface33class ICSRegistrarInterface
34{34{
35public:35public:
36 virtual ~ICSRegistrarInterface() {}
36 virtual int registerBuffer_interface(struct gralloc_module_t const* module, buffer_handle_t handle) const = 0;37 virtual int registerBuffer_interface(struct gralloc_module_t const* module, buffer_handle_t handle) const = 0;
37 virtual int unregisterBuffer_interface(struct gralloc_module_t const* module, buffer_handle_t handle) const = 0;38 virtual int unregisterBuffer_interface(struct gralloc_module_t const* module, buffer_handle_t handle) const = 0;
38 virtual int lock_interface(struct gralloc_module_t const* module, buffer_handle_t handle,39 virtual int lock_interface(struct gralloc_module_t const* module, buffer_handle_t handle,
3940
=== modified file 'tests/unit-tests/graphics/android/test_android_framebuffer_window.cpp'
--- tests/unit-tests/graphics/android/test_android_framebuffer_window.cpp 2013-05-20 15:55:48 +0000
+++ tests/unit-tests/graphics/android/test_android_framebuffer_window.cpp 2013-06-19 10:10:36 +0000
@@ -31,6 +31,7 @@
31class ANativeWindowInterface31class ANativeWindowInterface
32{32{
33public:33public:
34 virtual ~ANativeWindowInterface() = default;
34 virtual int query_interface(const ANativeWindow* win , int code, int* value) const = 0;35 virtual int query_interface(const ANativeWindow* win , int code, int* value) const = 0;
35};36};
3637
@@ -51,6 +52,8 @@
51 Return(0)));52 Return(0)));
52 }53 }
5354
55 ~MockANativeWindow() noexcept {}
56
54 static int hook_query(const ANativeWindow* anw, int code, int *ret)57 static int hook_query(const ANativeWindow* anw, int code, int *ret)
55 {58 {
56 const MockANativeWindow* mocker = static_cast<const MockANativeWindow*>(anw);59 const MockANativeWindow* mocker = static_cast<const MockANativeWindow*>(anw);
5760
=== modified file 'tests/unit-tests/test_gmock_fixes.cpp'
--- tests/unit-tests/test_gmock_fixes.cpp 2012-07-12 14:11:36 +0000
+++ tests/unit-tests/test_gmock_fixes.cpp 2013-06-19 10:10:36 +0000
@@ -26,12 +26,14 @@
26{26{
27 struct Interface27 struct Interface
28 {28 {
29 virtual ~Interface() = default;
29 virtual std::unique_ptr<int> function() const = 0;30 virtual std::unique_ptr<int> function() const = 0;
30 };31 };
3132
32 struct MockImplementation : Interface33 struct MockImplementation : Interface
33 {34 {
34 MOCK_CONST_METHOD0(function, std::unique_ptr<int>());35 MOCK_CONST_METHOD0(function, std::unique_ptr<int>());
36 ~MockImplementation() noexcept {}
35 };37 };
3638
37 MockImplementation mi;39 MockImplementation mi;

Subscribers

People subscribed via source and target branches