From 3dfd4ea3980c0a4ae921ae389bff134361f668ea Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@redhat.com>
Date: Tue, 8 Mar 2011 21:47:49 -0700
Subject: [PATCH] build: avoid compiler warning on cygwin

On cygwin:

  CC       libvirt_driver_security_la-security_dac.lo
security/security_dac.c: In function 'virSecurityDACSetProcessLabel':
security/security_dac.c:618: warning: format '%d' expects type 'int', but argument 7 has type 'uid_t' [-Wformat]

We've done this before (see src/util/util.c).

* src/security/security_dac.c (virSecurityDACSetProcessLabel): On
cygwin, uid_t is a 32-bit long.
---
 src/security/security_dac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index b8de2321e3..fba2d1ddbf 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -615,7 +615,8 @@ virSecurityDACSetProcessLabel(virSecurityManagerPtr mgr,
 {
     virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
 
-    VIR_DEBUG("Dropping privileges of VM to %d:%d", priv->user, priv->group);
+    VIR_DEBUG("Dropping privileges of VM to %u:%u",
+              (unsigned int) priv->user, (unsigned int) priv->group);
 
     if (virSetUIDGID(priv->user, priv->group) < 0)
         return -1;
-- 
GitLab