[libvirt] [PATCH] Fix conflicts with glibc globals

Davidlohr Bueso dave at gnu.org
Thu Feb 3 15:09:00 UTC 2011


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)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
 int virAllocVar(void *ptrptr,
                 size_t struct_size,
-- 
1.7.1






More information about the libvir-list mailing list