Bug 136667 - [WebKit2] Fix build error in WebKit2/WebProcess module
Summary: [WebKit2] Fix build error in WebKit2/WebProcess module
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 136631
  Show dependency treegraph
 
Reported: 2014-09-08 22:31 PDT by Shivakumar J M
Modified: 2014-09-08 23:42 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.12 KB, patch)
2014-09-08 22:36 PDT, Shivakumar J M
no flags Details | Formatted Diff | Diff
Patch for landing (1.24 KB, patch)
2014-09-08 23:11 PDT, Shivakumar J M
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.