Changeset 223949 in webkit


Ignore:
Timestamp:
Oct 24, 2017 11:26:58 PM (6 years ago)
Author:
commit-queue@webkit.org
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 <alex@igalia.com> 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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r223947 r223949  
     12017-10-24  Alejandro G. Castro  <alex@igalia.com>
     2
     3        Clean up gcc build warnings about reaching the end of a non void function for webrtc classes
     4        https://bugs.webkit.org/show_bug.cgi?id=178721
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Assert when we reach those situations and return some value after that to avoid warning.
     9
     10        No new tests, this is a clean up.
     11
     12        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
     13        (WebCore::sessionDescriptionType):
     14        (WebCore::signalingState):
     15        (WebCore::toRTCIceConnectionState):
     16        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
     17        (WebCore::bundlePolicyfromConfiguration):
     18        (WebCore::iceTransportPolicyfromConfiguration):
     19
    1202017-10-24  Ryosuke Niwa  <rniwa@webkit.org>
    221
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp

    r223476 r223949  
    9494        return "rollback";
    9595    }
     96
     97    ASSERT_NOT_REACHED();
     98    return "";
    9699}
    97100
     
    601604        return RTCSignalingState::Stable;
    602605    }
     606
     607    ASSERT_NOT_REACHED();
     608    return RTCSignalingState::Stable;
    603609}
    604610
     
    831837        return RTCIceConnectionState::Closed;
    832838    case webrtc::PeerConnectionInterface::kIceConnectionMax:
    833         ASSERT_NOT_REACHED();
    834         return RTCIceConnectionState::New;
    835     }
     839        break;
     840    }
     841
     842    ASSERT_NOT_REACHED();
     843    return RTCIceConnectionState::New;
    836844}
    837845
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp

    r223728 r223949  
    7878        return webrtc::PeerConnectionInterface::kBundlePolicyBalanced;
    7979    }
     80
     81    ASSERT_NOT_REACHED();
     82    return webrtc::PeerConnectionInterface::kBundlePolicyMaxCompat;
    8083}
    8184
     
    8891        return webrtc::PeerConnectionInterface::kAll;
    8992    }
     93
     94    ASSERT_NOT_REACHED();
     95    return webrtc::PeerConnectionInterface::kNone;
    9096}
    9197
Note: See TracChangeset for help on using the changeset viewer.