Title: [223949] trunk/Source/WebCore
- Revision
- 223949
- Author
- [email protected]
- Date
- 2017-10-24 23:26:58 -0700 (Tue, 24 Oct 2017)
Log Message
Clean up gcc build warnings about reaching the end of a non void function for webrtc classes
https://bugs.webkit.org/show_bug.cgi?id=178721
Patch by Alejandro G. Castro <[email protected]> on 2017-10-24
Reviewed by Youenn Fablet.
Assert when we reach those situations and return some value after that to avoid warning.
No new tests, this is a clean up.
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::sessionDescriptionType):
(WebCore::signalingState):
(WebCore::toRTCIceConnectionState):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::bundlePolicyfromConfiguration):
(WebCore::iceTransportPolicyfromConfiguration):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (223948 => 223949)
--- trunk/Source/WebCore/ChangeLog 2017-10-25 05:37:47 UTC (rev 223948)
+++ trunk/Source/WebCore/ChangeLog 2017-10-25 06:26:58 UTC (rev 223949)
@@ -1,3 +1,22 @@
+2017-10-24 Alejandro G. Castro <[email protected]>
+
+ Clean up gcc build warnings about reaching the end of a non void function for webrtc classes
+ https://bugs.webkit.org/show_bug.cgi?id=178721
+
+ Reviewed by Youenn Fablet.
+
+ Assert when we reach those situations and return some value after that to avoid warning.
+
+ No new tests, this is a clean up.
+
+ * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+ (WebCore::sessionDescriptionType):
+ (WebCore::signalingState):
+ (WebCore::toRTCIceConnectionState):
+ * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
+ (WebCore::bundlePolicyfromConfiguration):
+ (WebCore::iceTransportPolicyfromConfiguration):
+
2017-10-24 Ryosuke Niwa <[email protected]>
RenderSVGModelObject::checkIntersection triggers layout
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (223948 => 223949)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp 2017-10-25 05:37:47 UTC (rev 223948)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp 2017-10-25 06:26:58 UTC (rev 223949)
@@ -93,6 +93,9 @@
case RTCSdpType::Rollback:
return "rollback";
}
+
+ ASSERT_NOT_REACHED();
+ return "";
}
static inline RTCSdpType fromSessionDescriptionType(const webrtc::SessionDescriptionInterface& description)
@@ -600,6 +603,9 @@
case webrtc::PeerConnectionInterface::kClosed:
return RTCSignalingState::Stable;
}
+
+ ASSERT_NOT_REACHED();
+ return RTCSignalingState::Stable;
}
void LibWebRTCMediaEndpoint::OnSignalingChange(webrtc::PeerConnectionInterface::SignalingState rtcState)
@@ -830,9 +836,11 @@
case webrtc::PeerConnectionInterface::kIceConnectionClosed:
return RTCIceConnectionState::Closed;
case webrtc::PeerConnectionInterface::kIceConnectionMax:
- ASSERT_NOT_REACHED();
- return RTCIceConnectionState::New;
+ break;
}
+
+ ASSERT_NOT_REACHED();
+ return RTCIceConnectionState::New;
}
void LibWebRTCMediaEndpoint::OnIceConnectionChange(webrtc::PeerConnectionInterface::IceConnectionState state)
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp (223948 => 223949)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp 2017-10-25 05:37:47 UTC (rev 223948)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp 2017-10-25 06:26:58 UTC (rev 223949)
@@ -77,6 +77,9 @@
case RTCBundlePolicy::Balanced:
return webrtc::PeerConnectionInterface::kBundlePolicyBalanced;
}
+
+ ASSERT_NOT_REACHED();
+ return webrtc::PeerConnectionInterface::kBundlePolicyMaxCompat;
}
static inline webrtc::PeerConnectionInterface::IceTransportsType iceTransportPolicyfromConfiguration(const MediaEndpointConfiguration& configuration)
@@ -87,6 +90,9 @@
case RTCIceTransportPolicy::All:
return webrtc::PeerConnectionInterface::kAll;
}
+
+ ASSERT_NOT_REACHED();
+ return webrtc::PeerConnectionInterface::kNone;
}
static webrtc::PeerConnectionInterface::RTCConfiguration configurationFromMediaEndpointConfiguration(MediaEndpointConfiguration&& configuration)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes