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

Lukas Slebodnik lslebodn at redhat.com
Wed Jun 12 10:04:59 UTC 2013


On (12/06/13 10:20), 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

What version of gcc do you use?

Because I could not reproduce this warnings nor with gcc or with clang.
(both compilers installed from fedora 18 repo)

LS



More information about the sssd-devel mailing list