[Webkit-unassigned] [Bug 44466] Fix gcc warning introduced in 65731

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 24 01:59:10 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=44466





--- Comment #4 from Yury Semikhatsky <yurys at chromium.org>  2010-08-24 01:59:10 PST ---
(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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list