Bug 136667

Summary: [WebKit2] Fix build error in WebKit2/WebProcess module
Product: WebKit Reporter: Shivakumar J M <shiva.jm>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, gyuyoung.kim, ossy, ryuan.choi, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 136631    
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Shivakumar J M 2014-09-08 22:31:06 PDT
Getting Below Build error for EFL-WK2 build, since default case is not handled.

[ 84%] Building CXX object Source/WebKit2/CMakeFiles/WebKit2.dir/WebProcess/Plugins/Netscape/JSNPObject.cpp.o
/home/shiva.jm/webkit-git/svngitsep/WebKit/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp: In function ‘std::chrono::milliseconds WebKit::maximumBufferingTime(WebCore::CachedResource*)’:
/home/shiva.jm/webkit-git/svngitsep/WebKit/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp:115:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1plus: all warnings being treated as errors
make[2]: *** [Source/WebKit2/CMakeFiles/WebKit2.dir/WebProcess/Network/WebResourceLoadScheduler.cpp.o] Error 1
Comment 1 Shivakumar J M 2014-09-08 22:36:15 PDT
Created attachment 237841 [details]
Patch

Fix the build error by handling default case.
Comment 2 Darin Adler 2014-09-08 22:43:59 PDT
Comment on attachment 237841 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=237841&action=review

> Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp:116
> +    default:
> +        return 0_ms;

We don’t want a default here, because that will disable the warning that clang and other compilers give us when we forget to handle a case. Instead, we should put this return statement outside the switch, and we should also include ASSERT_NOT_REACHED.
Comment 3 Shivakumar J M 2014-09-08 23:11:41 PDT
Created attachment 237842 [details]
Patch for landing
Comment 4 Gyuyoung Kim 2014-09-08 23:27:57 PDT
Comment on attachment 237842 [details]
Patch for landing

cq=me
Comment 5 Csaba Osztrogonác 2014-09-08 23:39:02 PDT
Comment on attachment 237842 [details]
Patch for landing

Clearing flags on attachment: 237842

Committed r173420: <http://trac.webkit.org/changeset/173420>
Comment 6 Csaba Osztrogonác 2014-09-08 23:39:11 PDT
All reviewed patches have been landed.  Closing bug.