Enable Clang warning implicit-fallthrough and annotate the code.

BUG=4242
R=henrik.lundin@webrtc.org, stefan@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8187}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8187 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org
2015-01-28 18:37:58 +00:00
parent a907e01c63
commit 7d2b6a9346
13 changed files with 49 additions and 9 deletions

View File

@ -19,6 +19,7 @@
#include <assert.h>
#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
#include "webrtc/system_wrappers/interface/trace.h"
@ -626,9 +627,10 @@ ACMGenericCodec* ACMCodecDB::CreateCodecInstance(const CodecInst& codec_inst) {
default: {
return NULL;
}
return new ACMG722_1(codec_id);
}
return new ACMG722_1(codec_id);
#endif
FALLTHROUGH();
}
case 32000: {
#ifdef WEBRTC_CODEC_G722_1C
@ -649,10 +651,13 @@ ACMGenericCodec* ACMCodecDB::CreateCodecInstance(const CodecInst& codec_inst) {
default: {
return NULL;
}
return new ACMG722_1C(codec_id);
}
return new ACMG722_1C(codec_id);
#endif
FALLTHROUGH();
}
default:
FATAL();
}
} else if (!STR_CASE_CMP(codec_inst.plname, "CN")) {
// For CN we need to check sampling frequency to know what codec to create.

View File

@ -764,6 +764,7 @@ int NetEqImpl::GetAudioInternal(size_t max_length, int16_t* output,
sync_buffer_->IncreaseEndTimestamp(output_size_samples_);
// Skipping break on purpose. Execution should move on into the
// next case.
FALLTHROUGH();
}
case kAudioRepetition: {
// TODO(hlundin): Write test for this.

View File

@ -56,6 +56,7 @@ uint32_t TimestampScaler::ToInternal(uint32_t external_timestamp,
// full 48 kHz support.
numerator_ = 2;
denominator_ = 3;
break;
}
case kDecoderAVT:
case kDecoderCNGnb: