Skip to content

Commit

Permalink
Fix -Wextra-semi warnings.
Browse files Browse the repository at this point in the history
Starting from https://chromium-review.googlesource.com/c/1485012,
-Wextra-semi is enabled and WebRTC has some violations to fix.

This is a follow-up of https://webrtc-review.googlesource.com/c/123560.

Bug: webrtc:10355
Change-Id: I012b7497fc8991037fd77aa98f1579c22e08206f
Reviewed-on: https://webrtc-review.googlesource.com/c/124126
Reviewed-by: Karl Wiberg <[email protected]>
Commit-Queue: Mirko Bonadei <[email protected]>
Cr-Commit-Position: refs/heads/master@{#26831}
  • Loading branch information
MirkoBonadei authored and Commit Bot committed Feb 25, 2019
1 parent 3812fa9 commit c4dd730
Show file tree
Hide file tree
Showing 18 changed files with 74 additions and 74 deletions.
2 changes: 1 addition & 1 deletion api/test/fake_media_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class FakeMediaTransport : public MediaTransportInterface {

RTCError RequestKeyFrame(uint64_t channel_id) override {
return RTCError::OK();
};
}

void SetReceiveAudioSink(MediaTransportAudioSinkInterface* sink) override {}
void SetReceiveVideoSink(MediaTransportVideoSinkInterface* sink) override {}
Expand Down
8 changes: 4 additions & 4 deletions common_video/h264/sps_vui_rewriter_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ void TestSps(SpsMode mode, SpsVuiRewriter::ParseResult expected_parse_result) {

REWRITE_TEST(VuiAlreadyOptimal,
kNoRewriteRequired_VuiOptimal,
SpsVuiRewriter::ParseResult::kVuiOk);
SpsVuiRewriter::ParseResult::kVuiOk)
REWRITE_TEST(RewriteFullVui,
kRewriteRequired_NoVui,
SpsVuiRewriter::ParseResult::kVuiRewritten);
SpsVuiRewriter::ParseResult::kVuiRewritten)
REWRITE_TEST(AddBitstreamRestriction,
kRewriteRequired_NoBitstreamRestriction,
SpsVuiRewriter::ParseResult::kVuiRewritten);
SpsVuiRewriter::ParseResult::kVuiRewritten)
REWRITE_TEST(RewriteSuboptimalVui,
kRewriteRequired_VuiSuboptimal,
SpsVuiRewriter::ParseResult::kVuiRewritten);
SpsVuiRewriter::ParseResult::kVuiRewritten)
} // namespace webrtc
6 changes: 3 additions & 3 deletions examples/peerconnection/client/conductor.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Conductor : public webrtc::PeerConnectionObserver,
//

void OnSignalingChange(
webrtc::PeerConnectionInterface::SignalingState new_state) override{};
webrtc::PeerConnectionInterface::SignalingState new_state) override {}
void OnAddTrack(
rtc::scoped_refptr<webrtc::RtpReceiverInterface> receiver,
const std::vector<rtc::scoped_refptr<webrtc::MediaStreamInterface>>&
Expand All @@ -74,9 +74,9 @@ class Conductor : public webrtc::PeerConnectionObserver,
rtc::scoped_refptr<webrtc::DataChannelInterface> channel) override {}
void OnRenegotiationNeeded() override {}
void OnIceConnectionChange(
webrtc::PeerConnectionInterface::IceConnectionState new_state) override{};
webrtc::PeerConnectionInterface::IceConnectionState new_state) override {}
void OnIceGatheringChange(
webrtc::PeerConnectionInterface::IceGatheringState new_state) override{};
webrtc::PeerConnectionInterface::IceGatheringState new_state) override {}
void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) override;
void OnIceConnectionReceivingChange(bool receiving) override {}

Expand Down
2 changes: 1 addition & 1 deletion modules/audio_coding/acm2/audio_coding_module_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ const std::string payload_checksum =
"ab88b1a049c36bdfeb7e8b057ef6982a",
"27fef7b799393347ec3b5694369a1c36",
"27fef7b799393347ec3b5694369a1c36");
}; // namespace
} // namespace

TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) {
ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960));
Expand Down
32 changes: 16 additions & 16 deletions modules/audio_coding/codecs/opus/opus_speed_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ constexpr size_t kDurationSec = 400;
EncodeDecode(kDurationSec); \
}

ADD_TEST(10);
ADD_TEST(9);
ADD_TEST(8);
ADD_TEST(7);
ADD_TEST(6);
ADD_TEST(5);
ADD_TEST(4);
ADD_TEST(3);
ADD_TEST(2);
ADD_TEST(1);
ADD_TEST(0);
ADD_TEST(10)
ADD_TEST(9)
ADD_TEST(8)
ADD_TEST(7)
ADD_TEST(6)
ADD_TEST(5)
ADD_TEST(4)
ADD_TEST(3)
ADD_TEST(2)
ADD_TEST(1)
ADD_TEST(0)

#define ADD_BANDWIDTH_TEST(bandwidth) \
TEST_P(OpusSpeedTest, OpusSetBandwidthTest##bandwidth) { \
Expand All @@ -116,11 +116,11 @@ ADD_TEST(0);
EncodeDecode(kDurationSec); \
}

ADD_BANDWIDTH_TEST(OPUS_BANDWIDTH_NARROWBAND);
ADD_BANDWIDTH_TEST(OPUS_BANDWIDTH_MEDIUMBAND);
ADD_BANDWIDTH_TEST(OPUS_BANDWIDTH_WIDEBAND);
ADD_BANDWIDTH_TEST(OPUS_BANDWIDTH_SUPERWIDEBAND);
ADD_BANDWIDTH_TEST(OPUS_BANDWIDTH_FULLBAND);
ADD_BANDWIDTH_TEST(OPUS_BANDWIDTH_NARROWBAND)
ADD_BANDWIDTH_TEST(OPUS_BANDWIDTH_MEDIUMBAND)
ADD_BANDWIDTH_TEST(OPUS_BANDWIDTH_WIDEBAND)
ADD_BANDWIDTH_TEST(OPUS_BANDWIDTH_SUPERWIDEBAND)
ADD_BANDWIDTH_TEST(OPUS_BANDWIDTH_FULLBAND)

// List all test cases: (channel, bit rat, filename, extension).
const coding_param param_set[] = {
Expand Down
2 changes: 1 addition & 1 deletion modules/audio_coding/neteq/tools/neteq_quality_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enum LossModes {

class LossModel {
public:
virtual ~LossModel(){};
virtual ~LossModel() {}
virtual bool Lost(int now_ms) = 0;
};

Expand Down
2 changes: 1 addition & 1 deletion modules/audio_coding/test/EncodeDecodeTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Sender {
class Receiver {
public:
Receiver();
virtual ~Receiver() {};
virtual ~Receiver() {}
void Setup(AudioCodingModule *acm, RTPStream *rtpStream,
std::string out_file_name, size_t channels, int file_num);
void Teardown();
Expand Down
2 changes: 1 addition & 1 deletion modules/audio_device/linux/audio_device_alsa_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void WebrtcAlsaErrorHandler(const char* file,
const char* function,
int err,
const char* fmt,
...){};
...) {}

namespace webrtc {
static const unsigned int ALSA_PLAYOUT_FREQ = 48000;
Expand Down
4 changes: 2 additions & 2 deletions modules/audio_device/linux/audio_device_alsa_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ class AudioDeviceLinuxALSA : public AudioDeviceGeneric {

bool KeyPressed() const;

void Lock() RTC_EXCLUSIVE_LOCK_FUNCTION(_critSect) { _critSect.Enter(); };
void UnLock() RTC_UNLOCK_FUNCTION(_critSect) { _critSect.Leave(); };
void Lock() RTC_EXCLUSIVE_LOCK_FUNCTION(_critSect) { _critSect.Enter(); }
void UnLock() RTC_UNLOCK_FUNCTION(_critSect) { _critSect.Leave(); }

inline int32_t InputSanityCheckAfterUnlockedPeriod() const;
inline int32_t OutputSanityCheckAfterUnlockedPeriod() const;
Expand Down
4 changes: 2 additions & 2 deletions modules/audio_processing/aec3/echo_canceller3_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class CaptureTransportVerificationProcessor : public BlockProcessor {

void GetMetrics(EchoControl::Metrics* metrics) const override {}

void SetAudioBufferDelay(size_t delay_ms) override{};
void SetAudioBufferDelay(size_t delay_ms) override {}

private:
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CaptureTransportVerificationProcessor);
Expand Down Expand Up @@ -134,7 +134,7 @@ class RenderTransportVerificationProcessor : public BlockProcessor {

void GetMetrics(EchoControl::Metrics* metrics) const override {}

void SetAudioBufferDelay(size_t delay_ms) override{};
void SetAudioBufferDelay(size_t delay_ms) override {}

private:
std::deque<std::vector<std::vector<float>>> received_render_blocks_;
Expand Down
2 changes: 1 addition & 1 deletion modules/audio_processing/audio_processing_impl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class TestRenderPreProcessor : public CustomProcessing {
std::transform(channel_view.begin(), channel_view.end(),
channel_view.begin(), ProcessSample);
}
};
}
std::string ToString() const override { return "TestRenderPreProcessor"; }
void SetRuntimeSetting(AudioProcessing::RuntimeSetting setting) override {}
// Modifies a sample. This member is used in Process() to modify a frame and
Expand Down
2 changes: 1 addition & 1 deletion modules/video_coding/generic_encoder_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FakeEncodedImageCallback : public EncodedImageCallback {
encoded_image.timing_.flags != VideoSendTiming::kNotTriggered;
last_capture_timestamp_ = encoded_image.capture_time_ms_;
return Result(Result::OK);
};
}

void OnDroppedFrame(DropReason reason) override { ++num_frames_dropped_; }

Expand Down
6 changes: 3 additions & 3 deletions pc/rtc_stats_collector_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ class FakeVideoTrackForStats : public MediaStreamTrack<VideoTrackInterface> {
}

void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
const rtc::VideoSinkWants& wants) override{};
void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override{};
const rtc::VideoSinkWants& wants) override {}
void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override {}

VideoTrackSourceInterface* GetSource() const override { return nullptr; }
};
Expand Down Expand Up @@ -2197,7 +2197,7 @@ class RTCTestStats : public RTCStats {
RTCStatsMember<int32_t> dummy_stat;
};

WEBRTC_RTCSTATS_IMPL(RTCTestStats, RTCStats, "test-stats", &dummy_stat);
WEBRTC_RTCSTATS_IMPL(RTCTestStats, RTCStats, "test-stats", &dummy_stat)

// Overrides the stats collection to verify thread usage and that the resulting
// partial reports are merged.
Expand Down
Loading

0 comments on commit c4dd730

Please sign in to comment.