[PATCH 07/12] render: fix shadow warnings
Aaron Plattner
aplattner at nvidia.com
Mon Oct 29 13:33:17 PDT 2012
On 10/28/2012 12:27 PM, walter harms wrote:
>
>
> Am 28.10.2012 04:01, schrieb Yaakov (Cygwin/X):
>> From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
>>
>> Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
>> ---
>> render/picturestr.h | 8 ++++----
>> 1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/render/picturestr.h b/render/picturestr.h
>> index dc00f41..5644f28 100644
>> --- a/render/picturestr.h
>> +++ b/render/picturestr.h
>> @@ -363,10 +363,10 @@ extern _X_EXPORT RESTYPE GlyphSetType;
>> #define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p)
>>
>> #define VERIFY_PICTURE(pPicture, pid, client, mode) {\
>> - int rc = dixLookupResourceByType((pointer)&(pPicture), pid,\
>> - PictureType, client, mode);\
>> - if (rc != Success)\
>> - return rc;\
>> + int tmprc = dixLookupResourceByType((pointer)&(pPicture), pid,\
>> + PictureType, client, mode);\
>> + if (tmprc != Success)\
>> + return tmprc;\
>> }
>>
>> #define VERIFY_ALPHA(pPicture, pid, client, mode) {\
>
> This looks like a function. Is there a serous reason why this is a macro ?
It's a macro so it can cause the calling function to return, making the callers
shorter at the expense of making the codebase more cryptic.
-- Aaron
More information about the xorg-devel
mailing list