From: Michal Privoznik Date: Mon, 24 Sep 2018 08:45:44 +0000 (+0200) Subject: tools: Fix printf format X-Git-Tag: v4.8.0-rc1~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43749000406bef49fbd8fcddefae45414856d50e;p=thirdparty%2Flibvirt.git tools: Fix printf format We're passing size_t but using format for unsigned long. Introduced in latest vshTable rework patches. Signed-off-by: Michal Privoznik --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 2a416b919a..cfb0095333 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6949,7 +6949,7 @@ virshVcpuPinQuery(vshControl *ctl, if (!(pinInfo = virBitmapDataFormat(cpumap, cpumaplen))) goto cleanup; - if (virAsprintf(&vcpuStr, "%lu", i) < 0) + if (virAsprintf(&vcpuStr, "%zu", i) < 0) goto cleanup; if (vshTableRowAppend(table, vcpuStr, pinInfo, NULL) < 0) diff --git a/tools/virt-admin.c b/tools/virt-admin.c index ce74489edf..77928ddb80 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@ -398,7 +398,7 @@ cmdSrvList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED) for (i = 0; i < nsrvs; i++) { VIR_AUTOFREE(char *) idStr = NULL; - if (virAsprintf(&idStr, "%lu", i) < 0) + if (virAsprintf(&idStr, "%zu", i) < 0) goto cleanup; if (vshTableRowAppend(table,