build: cast [ug]id_t when printing

This is a recurring problem for cygwin :)
For example, see commit 23a4df88.

qemu/qemu_driver.c: In function 'qemuStateInitialize':
qemu/qemu_driver.c:691:13: error: format '%d' expects type 'int', but argument 8 has type 'uid_t' [-Wformat]

* src/qemu/qemu_driver.c (qemuStateInitialize): Add casts.
* daemon/remote.c (remoteDispatchAuthList): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Eric Blake
2013-05-30 07:59:14 -06:00
parent 19a7f9fffb
commit f43bb1dc20
2 changed files with 12 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
/*
* remote.c: handlers for RPC method calls
*
* Copyright (C) 2007-2012 Red Hat, Inc.
* Copyright (C) 2007-2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -2354,7 +2354,7 @@ remoteDispatchAuthList(virNetServerPtr server ATTRIBUTE_UNUSED,
} else if (callerUid == 0) {
char *ident;
if (virAsprintf(&ident, "pid:%lld,uid:%d",
(long long) callerPid, callerUid) < 0) {
(long long) callerPid, (int) callerUid) < 0) {
virReportOOMError();
goto cleanup;
}