From 657b2a49655d0e1f457ec200e21f980e4a74d074 Mon Sep 17 00:00:00 2001 From: "mflodman@webrtc.org" Date: Mon, 6 Feb 2012 11:06:01 +0000 Subject: [PATCH] Added return due to gcc complaints in r1604. TBR=andrew TEST=Bulid with clang version 3.1 (trunk 148911) and gcc. Review URL: https://webrtc-codereview.appspot.com/384004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1606 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/common_video/libyuv/libyuv.cc | 4 ++++ src/modules/audio_processing/echo_cancellation_impl.cc | 2 ++ src/modules/audio_processing/echo_control_mobile_impl.cc | 2 ++ src/modules/audio_processing/gain_control_impl.cc | 2 ++ src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc | 2 ++ src/modules/utility/source/file_player_impl.cc | 2 ++ src/modules/utility/source/file_recorder_impl.cc | 2 ++ src/system_wrappers/source/sort.cc | 2 ++ .../test/auto_test/primitives/framedrop_primitives.cc | 2 -- src/video_engine/vie_rtp_rtcp_impl.cc | 6 ++++++ 10 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/common_video/libyuv/libyuv.cc b/src/common_video/libyuv/libyuv.cc index b4e812212a..5b5b260aae 100644 --- a/src/common_video/libyuv/libyuv.cc +++ b/src/common_video/libyuv/libyuv.cc @@ -230,6 +230,8 @@ libyuv::RotationMode ConvertRotationMode(VideoRotationMode rotation) { case kRotate270: return libyuv::kRotate270; } + assert(false); + return libyuv::kRotate0; } int ConvertVideoType(VideoType video_type) { @@ -266,6 +268,8 @@ int ConvertVideoType(VideoType video_type) { case kBGRA: return libyuv::FOURCC_BGRA; } + assert(false); + return libyuv::FOURCC_ANY; } int ConvertToI420(VideoType src_video_type, diff --git a/src/modules/audio_processing/echo_cancellation_impl.cc b/src/modules/audio_processing/echo_cancellation_impl.cc index 1f0b0e203b..3cc0791542 100644 --- a/src/modules/audio_processing/echo_cancellation_impl.cc +++ b/src/modules/audio_processing/echo_cancellation_impl.cc @@ -33,6 +33,8 @@ WebRtc_Word16 MapSetting(EchoCancellation::SuppressionLevel level) { case EchoCancellation::kHighSuppression: return kAecNlpAggressive; } + assert(false); + return -1; } int MapError(int err) { diff --git a/src/modules/audio_processing/echo_control_mobile_impl.cc b/src/modules/audio_processing/echo_control_mobile_impl.cc index 2e3da60c05..c0189fbe3e 100644 --- a/src/modules/audio_processing/echo_control_mobile_impl.cc +++ b/src/modules/audio_processing/echo_control_mobile_impl.cc @@ -37,6 +37,8 @@ WebRtc_Word16 MapSetting(EchoControlMobile::RoutingMode mode) { case EchoControlMobile::kLoudSpeakerphone: return 4; } + assert(false); + return -1; } int MapError(int err) { diff --git a/src/modules/audio_processing/gain_control_impl.cc b/src/modules/audio_processing/gain_control_impl.cc index a00eadbff6..ffc137414f 100644 --- a/src/modules/audio_processing/gain_control_impl.cc +++ b/src/modules/audio_processing/gain_control_impl.cc @@ -48,6 +48,8 @@ WebRtc_Word16 MapSetting(GainControl::Mode mode) { return kAgcModeFixedDigital; break; } + assert(false); + return -1; } } // namespace diff --git a/src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index 962f8b2fc3..50fbda0cea 100644 --- a/src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc @@ -2258,6 +2258,8 @@ WebRtc_Word32 ModuleRtpRtcpImpl::RequestKeyFrame(const FrameType frameType) { return _rtcpSender.SendRTCP(kRtcpFir, 0, NULL, RTT); } } + assert(false); + return -1; } WebRtc_Word32 ModuleRtpRtcpImpl::SendRTCPSliceLossIndication( diff --git a/src/modules/utility/source/file_player_impl.cc b/src/modules/utility/source/file_player_impl.cc index 73d92b8969..2c1b504bbc 100644 --- a/src/modules/utility/source/file_player_impl.cc +++ b/src/modules/utility/source/file_player_impl.cc @@ -49,6 +49,8 @@ FilePlayer* FilePlayer::CreateFilePlayer(WebRtc_UWord32 instanceID, return NULL; #endif } + assert(false); + return NULL; } void FilePlayer::DestroyFilePlayer(FilePlayer* player) diff --git a/src/modules/utility/source/file_recorder_impl.cc b/src/modules/utility/source/file_recorder_impl.cc index 11fd25c2f1..ecba435791 100644 --- a/src/modules/utility/source/file_recorder_impl.cc +++ b/src/modules/utility/source/file_recorder_impl.cc @@ -51,6 +51,8 @@ FileRecorder* FileRecorder::CreateFileRecorder(WebRtc_UWord32 instanceID, return NULL; #endif } + assert(false); + return NULL; } void FileRecorder::DestroyFileRecorder(FileRecorder* recorder) diff --git a/src/system_wrappers/source/sort.cc b/src/system_wrappers/source/sort.cc index 445e6d6687..34aa4373ee 100644 --- a/src/system_wrappers/source/sort.cc +++ b/src/system_wrappers/source/sort.cc @@ -542,6 +542,8 @@ namespace webrtc case TYPE_Float64: return StdKeySort(data, key, numOfElements, sizeOfElement); } + assert(false); + return -1; #endif } } // namespace webrtc diff --git a/src/video_engine/test/auto_test/primitives/framedrop_primitives.cc b/src/video_engine/test/auto_test/primitives/framedrop_primitives.cc index 28ae7020ac..3e43197245 100644 --- a/src/video_engine/test/auto_test/primitives/framedrop_primitives.cc +++ b/src/video_engine/test/auto_test/primitives/framedrop_primitives.cc @@ -264,8 +264,6 @@ void FrameDropDetector::ReportFrameState(State state, unsigned int timestamp) { rendered_frames_[timestamp] = webrtc::TickTime::MicrosecondTimestamp(); num_rendered_frames_++; break; - default: - assert(false); } } diff --git a/src/video_engine/vie_rtp_rtcp_impl.cc b/src/video_engine/vie_rtp_rtcp_impl.cc index 009cddf489..a539a8e2ff 100644 --- a/src/video_engine/vie_rtp_rtcp_impl.cc +++ b/src/video_engine/vie_rtp_rtcp_impl.cc @@ -36,6 +36,8 @@ static RTCPMethod ViERTCPModeToRTCPMethod(ViERTCPMode api_mode) { case kRtcpNonCompound_RFC5506: return kRtcpNonCompound; } + assert(false); + return kRtcpOff; } static ViERTCPMode RTCPMethodToViERTCPMode(RTCPMethod module_method) { @@ -49,6 +51,8 @@ static ViERTCPMode RTCPMethodToViERTCPMode(RTCPMethod module_method) { case kRtcpNonCompound: return kRtcpNonCompound_RFC5506; } + assert(false); + return kRtcpNone; } static KeyFrameRequestMethod APIRequestToModuleRequest( @@ -66,6 +70,8 @@ static KeyFrameRequestMethod APIRequestToModuleRequest( case kViEKeyFrameRequestFirRtcp: return kKeyFrameReqFirRtcp; } + assert(false); + return kKeyFrameReqFirRtp; } ViERTP_RTCP* ViERTP_RTCP::GetInterface(VideoEngine* video_engine) {