Bug 145925 - Fix unused private field warning in PageBanner.h
Summary: Fix unused private field warning in PageBanner.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Csaba Osztrogonác
URL:
Keywords:
Depends on:
Blocks: 145121
  Show dependency treegraph
 
Reported: 2015-06-12 05:09 PDT by Csaba Osztrogonác
Modified: 2015-06-15 04:21 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.65 KB, patch)
2015-06-12 05:15 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
Patch (3.15 KB, patch)
2015-06-15 02:41 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2015-06-12 05:09:39 PDT
In file included from ../../Source/WebKit2/WebProcess/WebPage/PageBanner.cpp:27:
../../Source/WebKit2/WebProcess/WebPage/PageBanner.h:86:10: warning: private field 'm_type' is not used [-Wunused-private-field]
    Type m_type;
         ^
../../Source/WebKit2/WebProcess/WebPage/PageBanner.h:88:14: warning: private field 'm_webPage' is not used [-Wunused-private-field]
    WebPage* m_webPage;
             ^
../../Source/WebKit2/WebProcess/WebPage/PageBanner.h:90:10: warning: private field 'm_mouseDownInBanner' is not used [-Wunused-private-field]
    bool m_mouseDownInBanner;
         ^
../../Source/WebKit2/WebProcess/WebPage/PageBanner.h:91:10: warning: private field 'm_isHidden' is not used [-Wunused-private-field]
    bool m_isHidden;
         ^
4 warnings generated.
Comment 1 Csaba Osztrogonác 2015-06-12 05:15:07 PDT
Created attachment 254795 [details]
Patch
Comment 2 Darin Adler 2015-06-12 09:41:52 PDT
Comment on attachment 254795 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/PageBanner.h:90
> +    Type m_type;
> +    WebPage* m_webPage;

Source/WebKit2/WebProcess/WebPage/mac/PageBannerMac.mm:45:7: error: field 'm_type' will be initialized after field 'm_client' [-Werror,-Wreorder]

Need to fix this before landing.
Comment 3 Darin Adler 2015-06-12 09:42:36 PDT
Comment on attachment 254795 [details]
Patch

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

>> Source/WebKit2/WebProcess/WebPage/PageBanner.h:90
>> +    WebPage* m_webPage;
> 
> Source/WebKit2/WebProcess/WebPage/mac/PageBannerMac.mm:45:7: error: field 'm_type' will be initialized after field 'm_client' [-Werror,-Wreorder]
> 
> Need to fix this before landing.

Best way to fix it is probably to initialize m_type, m_webPage, m_mouseDownInBanner, and m_isHidden in the header rather than in the constructor.
Comment 4 Csaba Osztrogonác 2015-06-15 02:41:40 PDT
Created attachment 254867 [details]
Patch

Good point, I fixed it.
Comment 5 WebKit Commit Bot 2015-06-15 04:21:12 PDT
Comment on attachment 254867 [details]
Patch

Clearing flags on attachment: 254867

Committed r185549: <http://trac.webkit.org/changeset/185549>
Comment 6 WebKit Commit Bot 2015-06-15 04:21:15 PDT
All reviewed patches have been landed.  Closing bug.