On May 21, 2010, at 22:18, Jamey Sharp wrote:

> On Fri, May 21, 2010 at 11:19 AM, Jeremy Huddleston <[email protected]> 
> wrote:
>> The analyzer is correct.  It sees the call to miFillPolyHelper on line
>> 1849 and assumes that pGC can change because it is not const ...
>> 
>> My guess is that applying "const" correctly in many places will help
>> the SA avoid false positives like this.
> 
> Ooh, interesting. OK. miFillPolyHelper can't take a const pGC though,
> because eventually it passes it to ChangeGC (although with the invariant
> that it will be changed back before returning).

I think in this case, miFillPolyHelper should take a const pGC and pass it 
casted to non-const to ChangeGC (since it knows it will be preserved by another 
handshaking method).


_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to