[SSSD] [PATCH] be_ptask and be_refresh: send, recv shadow a global declaration

Pavel Březina pbrezina at redhat.com
Wed Jun 12 08:37:44 UTC 2013


On 06/12/2013 10:20 AM, Sumit Bose wrote:
> On Wed, Jun 12, 2013 at 09:55:57AM +0200, Pavel Březina wrote:
>> Hi,
>> Sumit found warning caused by my latest patch set.
>>
>>    CC     src/providers/dp_ptask.o
>> ../src/providers/dp_ptask.c: In function 'be_ptask_create':
>> ../src/providers/dp_ptask.c:249:41: warning: declaration of 'send'
>> shadows a global declaration [-Wshadow]
>> ../src/providers/dp_ptask.c:250:41: warning: declaration of 'recv'
>> shadows a global declaration [-Wshadow]
>>    CC     src/providers/dp_refresh.o
>> ../src/providers/dp_refresh.c: In function 'be_refresh_add_cb':
>> ../src/providers/dp_refresh.c:148:45: warning: declaration of 'send'
>> shadows a global declaration [-Wshadow]
>> ../src/providers/dp_refresh.c:149:45: warning: declaration of 'recv'
>> shadows a global declaration [-Wshadow]
>>    CCLD   sssd_be
>>
>> I wasn't able to trigger it even by setting -Wshadow explicitly,
>> maybe due to newer gcc version. Anyway, here are the patches.
>
> The patch looks good, because it makes clear that the two struct members
> are function pointers. But it doesn't let the warnings go away, because
> they were not triggered by the name of the struct member, but by the
> parameter names of be_ptask_create() and be_refresh_add_cb(). Would you
> mind to rename them to send_fn and recv_fn as well?
>
> bye,
> Sumit

Oops, I though I did. Eclipse failed my expectations :-)
Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-be_ptask-send-and-recv-shadow-a-global-declaration.patch
Type: text/x-patch
Size: 3577 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130612/584f05cc/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-be_refresh-send-and-recv-shadow-a-global-declaration.patch
Type: text/x-patch
Size: 3684 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130612/584f05cc/attachment-0001.bin>


More information about the sssd-devel mailing list