1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

qemu: use correct formatting string for size_t

Otherwise the build on armv7l breaks:
error: format ‘%lu’ expects argument of type
‘long unsigned int’, but argument 4 has type
‘size_t’ {aka ‘unsigned int’} [-Werror=format=]

Fixes: 1992ae40fa
Fixes: e239f7d0a8

Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Ján Tomko 2023-03-17 14:58:23 +01:00
parent 246d187a0f
commit 9dab836721
2 changed files with 3 additions and 3 deletions

View File

@ -824,8 +824,8 @@ qemuAliasForSecret(const char *parentalias,
size_t secret_idx)
{
if (obj)
return g_strdup_printf("%s-%s-secret%lu", parentalias, obj, secret_idx);
return g_strdup_printf("%s-secret%lu", parentalias, secret_idx);
return g_strdup_printf("%s-%s-secret%zu", parentalias, obj, secret_idx);
return g_strdup_printf("%s-secret%zu", parentalias, secret_idx);
}
/* qemuAliasTLSObjFromSrcAlias

View File

@ -2030,7 +2030,7 @@ qemuStorageSourcePrivateDataParse(xmlXPathContextPtr ctxt,
if (!(encalias = virXMLPropString(encnodes[i], "alias"))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("missing alias on encryption secret #%lu"), i);
_("missing alias on encryption secret #%zu"), i);
return -1;
}