On Tue, Nov 10, 2009 at 08:34:45PM -0500, Cole Robinson wrote:
On 11/10/2009 06:56 PM, Ryota Ozaki wrote:
> qemu/qemu_monitor_text.c: In function 'qemuMonitorTextIOProcess':
> qemu/qemu_monitor_text.c:175: error: format '%d' expects type 'int',
but argument 7 has type 'size_t'
>
> * src/qemu/qemu_monitor.c src/qemu/qemu_monitor_text.c:
> cast size_t to int when passing to '%d'
> ---
> src/qemu/qemu_monitor.c | 6 +++---
> src/qemu/qemu_monitor_text.c | 2 +-
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
> index 3e6a490..dcd2dd7 100644
> --- a/src/qemu/qemu_monitor.c
> +++ b/src/qemu/qemu_monitor.c
> @@ -179,7 +179,7 @@ qemuMonitorIOProcess(qemuMonitorPtr mon)
> if (mon->msg && mon->msg->txOffset ==
mon->msg->txLength)
> msg = mon->msg;
>
> - VIR_DEBUG("Process %d", mon->bufferOffset);
> + VIR_DEBUG("Process %d", (int)mon->bufferOffset);
> len = qemuMonitorTextIOProcess(mon,
> mon->buffer, mon->bufferOffset,
> msg);
> @@ -196,7 +196,7 @@ qemuMonitorIOProcess(qemuMonitorPtr mon)
> VIR_FREE(mon->buffer);
> mon->bufferOffset = mon->bufferLength = 0;
> }
> - VIR_DEBUG("Process done %d used %d", mon->bufferOffset, len);
> + VIR_DEBUG("Process done %d used %d", (int)mon->bufferOffset,
len);
> if (msg && msg->finished)
> virCondBroadcast(&mon->notify);
> return len;
> @@ -319,7 +319,7 @@ qemuMonitorIORead(qemuMonitorPtr mon)
> mon->buffer[mon->bufferOffset] = '\0';
> }
>
> - VIR_DEBUG("Now read %d bytes of data", mon->bufferOffset);
> + VIR_DEBUG("Now read %d bytes of data", (int)mon->bufferOffset);
>
> return ret;
> }
> diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
> index db7ff57..ee234a1 100644
> --- a/src/qemu/qemu_monitor_text.c
> +++ b/src/qemu/qemu_monitor_text.c
> @@ -172,7 +172,7 @@ int qemuMonitorTextIOProcess(qemuMonitorPtr mon
ATTRIBUTE_UNUSED,
>
> /* Don't print raw data in debug because its full of control chars */
> /*VIR_DEBUG("Process data %d byts of data [%s]", len - used, data +
used);*/
> - VIR_DEBUG("Process data %d byts of data", len - used);
> + VIR_DEBUG("Process data %d byts of data", (int)(len - used));
>
> /* Look for a non-zero reply followed by prompt */
> if (msg && !msg->finished) {
ACK, I was carrying a similar fix.
Okidoc, applied ! Thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/