Re: [PATCH sis 04/15] Fix "suggest parentheses around operand of ‘!’" compiler warnings.

TImo Aaltonen tjaalton at ubuntu.com
Thu Apr 7 13:45:51 PDT 2011


On 06.04.2011 23:14, Mark Kettenis wrote:
>> From: Timo Aaltonen <tjaalton at ubuntu.com>
>> Date: Wed,  6 Apr 2011 19:50:06 +0300
>>
>> Signed-off-by: Timo Aaltonen <timo.aaltonen at canonical.com>
>> ---
>>  src/sis_cursor.c  |    2 +-
>>  src/sis_utility.c |    2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/sis_cursor.c b/src/sis_cursor.c
>> index 13eddc4..67a3402 100644
>> --- a/src/sis_cursor.c
>> +++ b/src/sis_cursor.c
>> @@ -759,7 +759,7 @@ SiS300LoadCursorImage(ScrnInfoPtr pScrn, UChar *src)
>>      }
>>  
>>      if(pSiS->VBFlags & CRT2_ENABLE) {
>> -       if((pSiS->UseHWARGBCursor) && (!pSiS->VBFlags & DISPTYPE_CRT1)) {
>> +       if((pSiS->UseHWARGBCursor) && ((!pSiS->VBFlags) & DISPTYPE_CRT1)) {
> 
> Hmm, while your change is correct in the sense that it doesn't change
> the meaning of the code, I do think that what's actually meant here is:
> 
>        if((pSiS->UseHWARGBCursor) && (!(pSiS->VBFlags & DISPTYPE_CRT1))) {
> 
> What's there now, just doesn't make sense, since it will always
> evaluate to false.  See also SiS310LoadCursorImage.

Yeah, you're right. I'll post a fixed patch shortly. Thanks!


More information about the xorg-devel mailing list