[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Fix conflicts with glibc globals



On 02/03/2011 08:09 AM, Davidlohr Bueso wrote:
> When compiling libvirt with GCC 3.4.6 the following warning is being triggered quite a lot:
> 
> util/memory.h:60: warning: declaration of 'remove' shadows a global declaration
> /usr/include/stdio.h:175: warning: shadowed declaration is here
> 
> Fix this by renaming the parameter to 'toremove'.
> ---
>  src/util/memory.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/util/memory.h b/src/util/memory.h
> index 750a6b0..66b4c42 100644
> --- a/src/util/memory.h
> +++ b/src/util/memory.h
> @@ -57,7 +57,7 @@ int virExpandN(void *ptrptr, size_t size, size_t *count, size_t add)
>  int virResizeN(void *ptrptr, size_t size, size_t *alloc, size_t count,
>                 size_t desired)
>      ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
> -void virShrinkN(void *ptrptr, size_t size, size_t *count, size_t remove)
> +void virShrinkN(void *ptrptr, size_t size, size_t *count, size_t toremove)

What a pain.  But obviously correct fix (it matches the same change that
had been made earlier to the .c counterpart); ACK and pushed along with
an AUTHORS update to keep 'make syntax-check' happy.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]