Bug 183078 - [WebKit] Fix Clang unused parameter warnings of NetworkProcess
Summary: [WebKit] Fix Clang unused parameter warnings of NetworkProcess
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords:
Depends on:
Blocks: 145121
  Show dependency treegraph
 
Reported: 2018-02-23 03:05 PST by Fujii Hironori
Modified: 2018-02-26 08:43 PST (History)
12 users (show)

See Also:


Attachments
warning messages (26.37 KB, text/plain)
2018-02-23 03:05 PST, Fujii Hironori
no flags Details
Patch (15.35 KB, patch)
2018-02-23 03:09 PST, Fujii Hironori
mcatanzaro: review-
mcatanzaro: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2018-02-23 03:05:38 PST
[WebKit] Fix Clang warnings of NetworkProcess
Comment 1 Fujii Hironori 2018-02-23 03:05:59 PST
Created attachment 334513 [details]
warning messages
Comment 2 Fujii Hironori 2018-02-23 03:09:49 PST
Created attachment 334514 [details]
Patch
Comment 3 Yusuke Suzuki 2018-02-25 18:56:56 PST
Comment on attachment 334514 [details]
Patch

r=me
Comment 4 Michael Catanzaro 2018-02-25 19:13:41 PST
Comment on attachment 334514 [details]
Patch

No, we agreed to build WebKit2 without -Wunused-parameter. (For better or for worse; I actually like that warning.)

Fujii, why are you getting these warnings in your build? It should be suppressed by this block in Source/WebKit/CMakeLists.txt:

if (COMPILER_IS_GCC_OR_CLANG)
    WEBKIT_ADD_TARGET_CXX_FLAGS(WebKit -Wno-unused-parameter)
    WEBKIT_ADD_TARGET_CXX_FLAGS(WebProcess -Wno-unused-parameter)
    WEBKIT_ADD_TARGET_CXX_FLAGS(NetworkProcess -Wno-unused-parameter)
    WEBKIT_ADD_TARGET_CXX_FLAGS(StorageProcess -Wno-unused-parameter)
endif ()
Comment 5 Michael Catanzaro 2018-02-25 19:17:37 PST
Reference: https://lists.webkit.org/pipermail/webkit-dev/2015-January/027184.html

And: bug #142338
Comment 6 Yusuke Suzuki 2018-02-25 19:31:52 PST
(In reply to Michael Catanzaro from comment #4)
> Comment on attachment 334514 [details]
> Patch
> 
> No, we agreed to build WebKit2 without -Wunused-parameter. (For better or
> for worse; I actually like that warning.)
> 
> Fujii, why are you getting these warnings in your build? It should be
> suppressed by this block in Source/WebKit/CMakeLists.txt:
> 
> if (COMPILER_IS_GCC_OR_CLANG)
>     WEBKIT_ADD_TARGET_CXX_FLAGS(WebKit -Wno-unused-parameter)
>     WEBKIT_ADD_TARGET_CXX_FLAGS(WebProcess -Wno-unused-parameter)
>     WEBKIT_ADD_TARGET_CXX_FLAGS(NetworkProcess -Wno-unused-parameter)
>     WEBKIT_ADD_TARGET_CXX_FLAGS(StorageProcess -Wno-unused-parameter)
> endif ()

Oh, I didn't know that WebKit2 has a special rule for this. Thank you.
Comment 7 Fujii Hironori 2018-02-25 20:16:47 PST
Thank you, Michael and Yusuke.
I tried again, but can't reproduce the compilation warnings anymore.
There might be something wrong in my env. Closed as invalid.
Comment 8 Michael Catanzaro 2018-02-26 08:43:27 PST
(In reply to Yusuke Suzuki from comment #6)
> Oh, I didn't know that WebKit2 has a special rule for this. Thank you.

Actually, many of our subprojects use -Wno-unused-parameter, e.g. in Tools. It's not just Source/WebKit. I don't like the inconsistency, but that's the status quo.