Enable more Clang warnings for talk/

BUG=4242
R=andresp@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46999004

Cr-Commit-Position: refs/heads/master@{#9053}
This commit is contained in:
Henrik Kjellander 2015-04-22 13:21:30 +02:00
parent 5a3178042b
commit 7c027b64ae
8 changed files with 16 additions and 6 deletions

View File

@ -712,7 +712,7 @@ class VideoRendererWrapper : public VideoRendererInterface {
private:
explicit VideoRendererWrapper(cricket::VideoRenderer* renderer)
: renderer_(renderer), width_(0), height_(0) {}
: width_(0), height_(0), renderer_(renderer) {}
int width_, height_;
scoped_ptr<cricket::VideoRenderer> renderer_;
};

View File

@ -475,8 +475,8 @@ class StatsCollectorTest : public testing::Test {
new cricket::ChannelManager(media_engine_,
new cricket::FakeDeviceManager(),
rtc::Thread::Current())),
signaling_(channel_manager_.get()),
session_(channel_manager_.get()) {
session_(channel_manager_.get()),
signaling_(channel_manager_.get()) {
// By default, we ignore session GetStats calls.
EXPECT_CALL(session_, GetTransportStats(_)).WillRepeatedly(Return(false));
EXPECT_CALL(session_, mediastream_signaling()).WillRepeatedly(

View File

@ -81,6 +81,9 @@
'cflags': [
'-Wall',
'-Wextra',
'-Wimplicit-fallthrough',
'-Wmissing-braces',
'-Wreorder',
'-Wunused-variable',
# TODO(ronghuawu): Fix the warning caused by
# LateBindingSymbolTable::TableInfo from

View File

@ -379,7 +379,7 @@ bool SctpDataMediaChannel::OpenSctpSocket() {
}
// Disable MTU discovery
struct sctp_paddrparams params = {0};
struct sctp_paddrparams params = {{0}};
params.spp_assoc_id = 0;
params.spp_flags = SPP_PMTUD_DISABLE;
params.spp_pathmtu = kSctpMtu;

View File

@ -196,10 +196,13 @@ static int SeverityToFilter(int severity) {
switch (severity) {
case rtc::LS_VERBOSE:
filter |= webrtc::kTraceAll;
FALLTHROUGH();
case rtc::LS_INFO:
filter |= (webrtc::kTraceStateInfo | webrtc::kTraceInfo);
FALLTHROUGH();
case rtc::LS_WARNING:
filter |= (webrtc::kTraceTerseInfo | webrtc::kTraceWarning);
FALLTHROUGH();
case rtc::LS_ERROR:
filter |= (webrtc::kTraceError | webrtc::kTraceCritical);
}

View File

@ -1448,8 +1448,8 @@ WebRtcVideoChannel2::WebRtcVideoSendStream::WebRtcVideoSendStream(
const Settable<VideoCodecSettings>& codec_settings,
const StreamParams& sp,
const std::vector<webrtc::RtpExtension>& rtp_extensions)
: call_(call),
ssrcs_(sp.ssrcs),
: ssrcs_(sp.ssrcs),
call_(call),
external_encoder_factory_(external_encoder_factory),
stream_(NULL),
parameters_(webrtc::VideoSendStream::Config(),

View File

@ -182,10 +182,13 @@ static int SeverityToFilter(int severity) {
switch (severity) {
case rtc::LS_VERBOSE:
filter |= webrtc::kTraceAll;
FALLTHROUGH();
case rtc::LS_INFO:
filter |= (webrtc::kTraceStateInfo | webrtc::kTraceInfo);
FALLTHROUGH();
case rtc::LS_WARNING:
filter |= (webrtc::kTraceTerseInfo | webrtc::kTraceWarning);
FALLTHROUGH();
case rtc::LS_ERROR:
filter |= (webrtc::kTraceError | webrtc::kTraceCritical);
}

View File

@ -1063,6 +1063,7 @@ bool BaseChannel::SetRtcpMux_w(bool enable, ContentAction action,
case CA_UPDATE:
// No RTCP mux info.
ret = true;
break;
default:
break;
}