Bug 46687

Summary: [chromium] Increase warning level for chromium linux build
Product: WebKit Reporter: James Robinson <jamesr>
Component: New BugsAssignee: James Robinson <jamesr>
Status: RESOLVED FIXED    
Severity: Normal CC: agl, dglazkov, fishd, thakis, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch tony: review+

Description James Robinson 2010-09-27 19:00:53 PDT
[chromium] Increase warning level for chromium linux build
Comment 1 James Robinson 2010-09-27 19:06:35 PDT
Created attachment 69009 [details]
Patch
Comment 2 Nico Weber 2010-09-27 20:38:13 PDT
Comment on attachment 69009 [details]
Patch

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

> WebCore/WebCore.gyp/WebCore.gyp:247
>          # enable -Wall and -Werror, just in Mac build for now

update this comment?

> WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp:118
> +        || ((direction == PlatformThemeChromiumGtk::East || direction == PlatformThemeChromiumGtk::South) && scrollbar->currentPos() != scrollbar->maximum()))

This looks overparenthesized. What's the warning without this?
Comment 3 Adam Langley 2010-09-28 07:20:41 PDT
LGTM, although I also wonder about the additional ( )
Comment 4 Tony Chang 2010-09-28 09:53:55 PDT
(In reply to comment #2)
> (From update of attachment 69009 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=69009&action=review
> 
> > WebCore/WebCore.gyp/WebCore.gyp:247
> >          # enable -Wall and -Werror, just in Mac build for now
> 
> update this comment?
> 
> > WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp:118
> > +        || ((direction == PlatformThemeChromiumGtk::East || direction == PlatformThemeChromiumGtk::South) && scrollbar->currentPos() != scrollbar->maximum()))
> 
> This looks overparenthesized. What's the warning without this?


There's an a || b && c in there which makes the second pair of () that james added necessary.  I think we can drop the first pair of ().
Comment 5 Tony Chang 2010-09-28 09:54:27 PDT
Comment on attachment 69009 [details]
Patch

r=me with review comments addressed
Comment 6 James Robinson 2010-09-28 12:51:59 PDT
gcc requires "a || b && c" have parens around the "b && c" part.  The rest of the parens on that line are needed, I believe the rest of the parens are still needed.

However I forgot to check in debug as well.  Will update.
Comment 7 James Robinson 2010-09-28 12:52:20 PDT
Comment on attachment 69009 [details]
Patch

Missed some.
Comment 8 James Robinson 2010-09-28 14:41:03 PDT
Created attachment 69106 [details]
Patch
Comment 9 James Robinson 2010-09-28 14:41:44 PDT
Fixed the comment in the .gyp and drops one set of parens from ScrollbarThemeChromiumLinux.cpp.
Comment 10 James Robinson 2010-09-28 14:49:06 PDT
Committed r68564: <http://trac.webkit.org/changeset/68564>