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

[libvirt] [PATCH] daemon: Fix build without polkit



---
Pushed under the build-breaker rule.

 daemon/libvirtd.c |   10 +++++-----
 daemon/remote.c   |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 62f089d..d1f80e4 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -874,7 +874,7 @@ static void
 daemonConfigFree(struct daemonConfig *data);
 
 static struct daemonConfig*
-daemonConfigNew(bool privileged)
+daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
 {
     struct daemonConfig *data;
     char *localhost;
@@ -1034,8 +1034,10 @@ daemonConfigLoad(struct daemonConfig *data,
      */
     if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) {
         VIR_FREE(data->unix_sock_rw_perms);
-        if (!(data->unix_sock_rw_perms = strdup("0777")))
-            goto no_memory;
+        if (!(data->unix_sock_rw_perms = strdup("0777"))) {
+            virReportOOMError();
+            goto error;
+        }
     }
 #endif
     if (remoteConfigGetAuth(conf, "auth_unix_ro", &data->auth_unix_ro, filename) < 0)
@@ -1091,8 +1093,6 @@ daemonConfigLoad(struct daemonConfig *data,
     virConfFree (conf);
     return 0;
 
-no_memory:
-    virReportOOMError();
 error:
     virConfFree (conf);
     return -1;
diff --git a/daemon/remote.c b/daemon/remote.c
index 47e47e4..9547702 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -2209,7 +2209,7 @@ authdeny:
 
 static int
 remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
-                         virNetServerClientPtr client,
+                         virNetServerClientPtr client ATTRIBUTE_UNUSED,
                          virNetMessageHeaderPtr hdr ATTRIBUTE_UNUSED,
                          virNetMessageErrorPtr rerr,
                          remote_auth_polkit_ret *ret ATTRIBUTE_UNUSED)
-- 
1.7.6


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