aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Denemark <jdenemar@redhat.com>2011-06-28 21:09:05 +0200
committerJiri Denemark <jdenemar@redhat.com>2011-06-28 21:09:05 +0200
commit26dbed1516b9526fc949a3a9879749dcdc481f9c (patch)
tree015866c1ca871cd6eaf37eab5bf32e5ac11786ec
parentremote: fix uninitialized variable (diff)
downloadlibvirt-26dbed1516b9526fc949a3a9879749dcdc481f9c.tar.gz
libvirt-26dbed1516b9526fc949a3a9879749dcdc481f9c.tar.bz2
libvirt-26dbed1516b9526fc949a3a9879749dcdc481f9c.zip
daemon: Fix build without polkit
-rw-r--r--daemon/libvirtd.c10
-rw-r--r--daemon/remote.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 62f089dd4..d1f80e459 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 47e47e448..954770296 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)