Bug 145925

Summary: Fix unused private field warning in PageBanner.h
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: New BugsAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 145121    
Attachments:
Description Flags
Patch
none
Patch none

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.