Enable -Winconsistent-missing-override flag.

The problem with gmock is worked around by commenting out any other override declarations in classes using gmock.

NOPRESUBMIT=True
BUG=webrtc:3970

Review-Url: https://codereview.webrtc.org/1921653002
Cr-Commit-Position: refs/heads/master@{#12563}
This commit is contained in:
nisse
2016-04-29 06:09:15 -07:00
committed by Commit bot
parent b296d0591c
commit ef8b61e110
58 changed files with 231 additions and 196 deletions

View File

@ -21,6 +21,10 @@ namespace webrtc {
class MockProcessThread : public ProcessThread {
public:
// TODO(nisse): Valid overrides commented out, because the gmock
// methods don't use any override declarations, and we want to avoid
// warnings from -Winconsistent-missing-override. See
// http://crbug.com/428099.
MOCK_METHOD0(Start, void());
MOCK_METHOD0(Stop, void());
MOCK_METHOD1(WakeUp, void(Module* module));
@ -31,7 +35,7 @@ class MockProcessThread : public ProcessThread {
// MOCK_METHOD1 gets confused with mocking this method, so we work around it
// by overriding the method from the interface and forwarding the call to a
// mocked, simpler method.
void PostTask(std::unique_ptr<ProcessTask> task) override {
void PostTask(std::unique_ptr<ProcessTask> task) /* override */ {
PostTask(task.get());
}
};