[PATCH] Fix conflicts with glibc globals

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

 



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



--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]