Summary: | Fix gcc warning introduced in 65731 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Csaba Osztrogonác <ossy> | ||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | podivilov, yurys | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 43191 | ||||||||
Attachments: |
|
Description
Csaba Osztrogonác
2010-08-23 16:29:44 PDT
Created attachment 65232 [details]
Fix both warnings.
Created attachment 65233 [details]
Fix both warnings.
- mask = mask | (mask >> domBreakpointDerivedTypeShift) & ((1 << domBreakpointDerivedTypeShift) - 1); + mask = (mask | (mask >> domBreakpointDerivedTypeShift)) & ((1 << domBreakpointDerivedTypeShift) - 1); I don't understand what should this code do, but adding parantheses like this, will change the behaviour of the code. Which one is wrong? The original or the modified? a | b & c is equal to a | (b & c) , because & has higher precedence than | (In reply to comment #3) > - mask = mask | (mask >> domBreakpointDerivedTypeShift) & ((1 << domBreakpointDerivedTypeShift) - 1); > + mask = (mask | (mask >> domBreakpointDerivedTypeShift)) & ((1 << domBreakpointDerivedTypeShift) - 1); > > I don't understand what should this code do, but adding > parantheses like this, will change the behaviour of the code. > Which one is wrong? The original or the modified? > > a | b & c is equal to a | (b & c) , because & has higher precedence than | The latter version is correct, original one had a bug since we want new mask to fit into domBreakpointDerivedTypeShift bits. Thanks for pointing this out. *** Bug 44468 has been marked as a duplicate of this bug. *** Landed in http://trac.webkit.org/changeset/65887 |