[libvirt] [PATCH] build: silence gcc warning

Eric Blake eblake at redhat.com
Fri Aug 12 21:55:53 UTC 2011


util/virpidfile.c: In function 'virPidFileAcquirePath':
util/virpidfile.c:308:66: error: nested extern declaration of '_gl_verify_function2' [-Wnested-externs]

* src/util/virpidfile.c (virPidFileAcquirePath): Move verify to
top level.
---

Pushing under the build-breaker rule.

 src/util/virpidfile.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/util/virpidfile.c b/src/util/virpidfile.c
index 38cc7e2..7dd3c51 100644
--- a/src/util/virpidfile.c
+++ b/src/util/virpidfile.c
@@ -299,13 +299,13 @@ cleanup:
 }


+verify(sizeof(pid_t) <= sizeof(unsigned int));

 int virPidFileAcquirePath(const char *path,
                           pid_t pid)
 {
     int fd = -1;
     char pidstr[INT_BUFSIZE_BOUND(pid)];
-    verify(sizeof(pid_t) <= sizeof(unsigned int));

     if (path[0] == '\0')
         return 0;
-- 
1.7.4.4




More information about the libvir-list mailing list