[libvirt] [PATCH] util: Fix build on s390

Jiri Denemark jdenemar at redhat.com
Fri Oct 7 10:43:58 UTC 2016


GCC on s390 complains

util/virconf.c: In function 'virConfGetValueSizeT':
util/virconf.c:1220:9: error: format '%zu' expects argument of type
'size_t', but argument 9 has type 'unsigned int' [-Werror=format=]

Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
---
 src/util/virconf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virconf.c b/src/util/virconf.c
index 3e49f41..1372389 100644
--- a/src/util/virconf.c
+++ b/src/util/virconf.c
@@ -1219,7 +1219,7 @@ int virConfGetValueSizeT(virConfPtr conf,
     if (((unsigned long long)cval->l) > SIZE_MAX) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("%s: value for '%s' parameter must be in range 0:%zu"),
-                       conf->filename, setting, SIZE_MAX);
+                       conf->filename, setting, (size_t) SIZE_MAX);
         return -1;
     }
 #endif
-- 
2.10.1




More information about the libvir-list mailing list