Bug 250562 - [GCC] Compiler errors with GCC-12 with libwebrtc (USE_GSTREAMER_WEBRTC=FALSE)
Summary: [GCC] Compiler errors with GCC-12 with libwebrtc (USE_GSTREAMER_WEBRTC=FALSE)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Local Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-13 04:02 PST by Manuel A. Fernandez Montecelo
Modified: 2023-01-13 06:42 PST (History)
2 users (show)

See Also:


Attachments
Proposed patch that fixes the issue (1.21 KB, patch)
2023-01-13 04:02 PST, Manuel A. Fernandez Montecelo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel A. Fernandez Montecelo 2023-01-13 04:02:52 PST
Created attachment 464483 [details]
Proposed patch that fixes the issue

Errors in two files:

-----------
In file included from /home/build/WebKit/WebKitBuild/Release/WebCore/DerivedSources/unified-sources/UnifiedSource-cbdfe323-29.cpp:4:                                                         
/home/build/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp: In function ‘std::optional<WebCore::RTCErrorDetailType> WebCore::toRTCErrorDetailType(webrtc::RTCErrorDetailType)’:                                                                                                                                                                                   
/home/build/WebKit/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:449:1: error: control reaches end of non-void function [-Werror=return-type]                              
  449 | }                                                                                                                                                                                    
      | ^                                                                                                                                                                                    
cc1plus: all warnings being treated as errors                                                                                                                                                
[5700/9138] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-68aea4ac-20.cpp.o                                           
ninja: build stopped: subcommand failed.
-----------

-----------
/home/build/WebKit/Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp: In member function ‘virtual webrtc::PeerConnectionInterface::SignalingState WebCore::MockLibWebRTCPeerConnection::signaling_state()’:
/home/build/WebKit/Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp:278:1: error: control reaches end of non-void function [-Werror=return-type]
  278 | }
      | ^
-----------


This happens at least since commit 9def6e6f0258ddd9171d32bec2fffb684dbc7b8b until current tip (2c3591d6db31967955f974e615d986177db22774).

The attached patch solves the compilation problem, I tried to put "default" to what it makes more sense to me, although in a way "default" should not be needed because the "case" options cover all possible values, AFAICT.

The version of the compiler that I am using is:
gcc (Debian 12.2.0-13) 12.2.0
Comment 1 Manuel A. Fernandez Montecelo 2023-01-13 05:35:31 PST
Pull request: https://github.com/WebKit/WebKit/pull/8616
Comment 2 EWS 2023-01-13 06:41:04 PST
Committed 258871@main (d1d4a86a623f): <https://commits.webkit.org/258871@main>

Reviewed commits have been landed. Closing PR #8616 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-01-13 06:42:23 PST
<rdar://problem/104222717>